I've just updated to the latest release and find that date fields with a non-default format (i.e not yyyy-mm-dd) aren't working. The date picker comes up but the date is not displayed in the field after selection - I am using dd-mmm-yyyy for these fields. I also find that when the field receives focus the existing value, say '01-Sep-2024' becomes '01-September-2024' - very strange.
Modified dates are set to null in the database - have I had a failure during upgrade?
DB Version V4.5-2024.05.31.00
Files Version V4.5-2024.06.03.00
Neil.
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
nuDate Problems - Urgent Topic is solved
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: nuDate Problems - Urgent
If possible, consider temporarily changing the format to yyyy-mm-dd until a fix is in place.
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: nuDate Problems - Urgent
I think the issue lies within the nuConvertToVanillaJSCalendarFormat() function in nuform.js:. Please try replacing it with the following updated version
Code: Select all
function nuConvertToVanillaJSCalendarFormat(str) {
const formatMapping = {
'D|': '',
'ddd': 'DD',
'mmm': 'M'
};
let newStr = str.replace(/D\||ddd|mmm/g, match => formatMapping[match]);
return newStr;
}
-
- Posts: 148
- Joined: Mon Dec 05, 2011 12:23 pm
- Location: Newton Abbot, UK
- Has thanked: 1 time
- Been thanked: 1 time
Re: nuDate Problems - Urgent
I've had to revert to the backup DB 2024.05.07.00 & Files 2024.05.11.00 so will need to set up a test environment before risking another upgrade! Too many date fields to change them all.
Will get back to you when I've set up a copy (busy at the moment).
Will get back to you when I've set up a copy (busy at the moment).
-
- Posts: 148
- Joined: Mon Dec 05, 2011 12:23 pm
- Location: Newton Abbot, UK
- Has thanked: 1 time
- Been thanked: 1 time
Re: nuDate Problems - Urgent
The code you've given above appears to be the same as I already have in the new version (downloaded this morning UK time)?
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: nuDate Problems - Urgent
Code: Select all
'mmm': 'MM'
Code: Select all
'mmm': 'M'
PS: Use e.g .https://www.diffchecker.com to compare codes
-
- Posts: 148
- Joined: Mon Dec 05, 2011 12:23 pm
- Location: Newton Abbot, UK
- Has thanked: 1 time
- Been thanked: 1 time
Re: nuDate Problems - Urgent
OK, I didn't think to change formats via the SQL prompt, but don't want to do that anyway in case some other issue arises as a consequence (most likely in my code).
I'm ashamed I couldn't see the difference in a 3-line function...
I'm ashamed I couldn't see the difference in a 3-line function...