New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date issues for non-default date_format_short in reviewDueDate and responseDueDate #3420
Comments
Not sure that this is the right way, but for me the following patch worked for issue (i)
|
@vasylOstrovskyi You have diagnosed the problem correctly. The When the user chooses another value, the altFormat takes effect, and changes the value to the "yy-mm-dd" format. But if the user leaves the value as-is, and because the value comes in the short-date format from the server code, the altField sticks with the "wrong" value. Would you care to add a Pull Request for this fix? |
@vasylOstrovskyi do you maybe want me to add the code you suggested? |
@NateWr |
@NateWr reminder |
Sorry for the delay, @defstat. Can you give me some steps to reproduce this issue so I can test it out? |
Not a problem @NateWr ... |
[pkp-lib] #3420 Default Date Format added to datepicker
👍 All merged. |
What I do:
Result: In the list of assigned reviewers I have "Overdue" status with wrong date "Response due: 2016-03-20". Similarly for Review due. Dates in the database are set incorrect which implies their further wrong usage.
So I observe two issues:
i) wrong date. (this is similar to #2689, probably duplicate)
ii) wrong date format in Review status line (It would be better to use date_format_short there istead of %Y-%m-%d)
More investigations of possible reasons for that:
a. With Edit review action, the dates can be manually corrected and set correct.
b. If on the step 5 above I change dates manually or with datepicker, the dates are set and saved correctly, so the issue (i) is likely related to the initial setting of form data.
Update: on the edit review assignment page, the situation is the same: I can set and record correct dates, however, if I just press OK button (without modifying date fields, e.g. simply checking some details), these dates are again set to incorrect values (in my case, 20.03.2016 and 20.03.2023), which is very bad since in the form everything looked correct.
One more update: I investigate page source using browser debugger and narrowed the problem. I noticed that on load, the review edit page contains the following data for review due date field:
but any (manual or datepicker) modification of its value immediately change it to
so that the date format of value in the hidden field changed on modification.
The text was updated successfully, but these errors were encountered: