#3900 (Cannot manually edit a date field)
by Luc Saffre · in Developers · assigned to Sharif Mehedi
Kurzbeschreibung
Kinder
Kommentare
- 5 Jahre, 6 Monate ago von Luc Saffre about #3900 (Cannot manually edit a date field) : Confirmed locally with blurry branch. Merged blurry into master and confirmed again. Great job. Now there is a new issue: #4066
- 5 Jahre, 6 Monate ago von Sharif Mehedi about #3900 (Cannot manually edit a date field) : I think we are all set for this one and also for #4060. Everything's working fine.
- 5 Jahre, 6 Monate ago von Sharif Mehedi about #3900 (Cannot manually edit a date field) : Frustrating to see that multiple similar components defined in different places, unusual. Finally found the update_value definition for LinoDialog in App.js.
- 5 Jahre, 6 Monate ago von Sharif Mehedi about #3900 (Cannot manually edit a date field) : LinoDialog never had the update_value defined. There might exist other non-existent values.
- 5 Jahre, 6 Monate ago von Sharif Mehedi about #3900 (Cannot manually edit a date field) : For some reason the update_value function of LinoDetail is not functioning properly. For that, datefield remain still broken.
- 5 Jahre, 6 Monate ago von Sharif Mehedi about #3900 (Cannot manually edit a date field) : I have the date field working properly also in dialog windows and committed my work in github repo.
- 5 Jahre, 6 Monate ago von Luc Saffre about #3900 (Cannot manually edit a date field) (1 Antwort) : Yes, indeed, we don't need a Select button, clicking on a date should simply close the calendar and fill the text field.
- 5 Jahre, 6 Monate ago von Sharif Mehedi about #3900 (Cannot manually edit a date field) : Sorry, my bad. The link to check the calendar was for lino_shop, 127.0.0.1:8000/#/api/ledger/FiscalYears/
- 5 Jahre, 6 Monate ago von Sharif Mehedi about #3900 (Cannot manually edit a date field) : I worked on the part of code that is responsible for rendering Calendar inside LinoGrid. Where, only the button click open the datePicker window and clicking on a date works as a select action that takes the date to the input and closes the window. I can make a custom cancel button or "X" button to ...
- 5 Jahre, 6 Monate ago von Luc Saffre about #3900 (Cannot manually edit a date field) (1 Antwort) : Quick feedback before going to bed: at least it is now usable again. But clicking on the icon to pick a date doesn't work any more. Next to the "Today" and "Clear" buttons there should be a "Select" button, which would close the calendar window and insert the selected date into the text field. There...
- 5 Jahre, 6 Monate ago von Sharif Mehedi about #3900 (Cannot manually edit a date field) : There are two things I want to mention here about the primereact Calender dateInput bug: The reason why the bug was introduced in the first place is that, the DataTable.onEditorInit method changes the state of LinoGrid and causes everything in the grid to render again once clicked on a grid element. ...
- 5 Jahre, 6 Monate ago von Sharif Mehedi about #3900 (Cannot manually edit a date field) : I pushed to the PR again. Pushed commit updates the Calendar with an working overlay panel. the "clear" button on the overlay panel sends an empty string to the server to save and in response the server raises an exception with the message "There's nothing to save.". I am thinking whether to remove t...
- 5 Jahre, 6 Monate ago von Sharif Mehedi about #3900 (Cannot manually edit a date field) (1 Antwort) : I may have found a work around in primefaces.org/primereact/showcase/#/calendar . I will look into it and other stuff, if need be.
- 5 Jahre, 6 Monate ago von Luc Saffre about #3900 (Cannot manually edit a date field) : I also sent an email to darthbob88 (the OP iof this issue), asking "Your post is almost a year old, are you still using primereact? Did you have any solution or workaround since then?"
- 5 Jahre, 6 Monate ago von Luc Saffre about #3900 (Cannot manually edit a date field) : The issue has been reported at the primereact forum : [url forum.primefaces.org/viewtopic.php?f=57&;t=62020] and I now submitted a reply (which is not yet visible because it has to get approved first).
- 5 Jahre, 6 Monate ago von Sharif Mehedi about #3900 (Cannot manually edit a date field) (1 Antwort) : Made a PR. Date input is manually editable now. but the overlay panel is not functional. I will try to work out a hack suitable for it. I am thinking maybe we should rethink the lino_react design strategy.
- 5 Jahre, 6 Monate ago von Luc Saffre about #3900 (Cannot manually edit a date field) : This ticket is really disturbing me. I assigned it to @8lurry. When you have time, work on this one first!
- 5 Jahre, 9 Monate ago von Luc Saffre about #3900 (Cannot manually edit a date field) : Continued to explore the deepness of this issue. Javascript has no built-in date parsing, and there are several libraries for doing it. And PrimeReact implements its own parseDate() and parseTime() functions, including its own "syntax" for the format string. Wow.
- 5 Jahre, 9 Monate ago von Luc Saffre about #3900 (Cannot manually edit a date field) : It's easier to just say "npm update". Result: "added 15 packages from 11 contributors, removed 14 packages, updated 94 packages and audited 1018 packages in 15.323s"
- 5 Jahre, 9 Monate ago von Luc Saffre about #3900 (Cannot manually edit a date field) : I did "npm install xxx --save" also for some other packages (react, react-router-dom, react-input-trigger, rc-collaps, react-transition-group... actually all those listed in dependencies).
- 5 Jahre, 9 Monate ago von Luc Saffre about #3900 (Cannot manually edit a date field) : I updated primereact from 5.0.0 to 5.0.2 and tried to remove Tonis' patch. No, the bug is not fixed. It seems that the primereact calendar widget by design is not meant to support manual date editing in the text field. As soon as I make a change, the value (of course) temporarily becomes an invalid ...
- 5 Jahre, 9 Monate ago von Luc Saffre about #3900 (Cannot manually edit a date field) : Seems that there is some bug in the primereact calendar widget (it fails to show initial values) which Tonis fixed with that patch. But the patch has the side effect of not letting me enter a data manually in the text field.
- 5 Jahre, 9 Monate ago von Luc Saffre about #3900 (Cannot manually edit a date field) : We patch the default primereact Calendar component in react/compoments/primereact/calendar.js and when I deactivate some of these patches, the problem disappears. But deactivating them causes other things to break: date fields no longer have an initial value when editing them.