Page 1 of 1

nuDate in a form / time travel

Posted: Mon Dec 30, 2019 7:53 pm
by jtoonen
I am using linux (ubuntu based but different versions)with both apache2 and nginx and mysql and mariadb. This in order to ensure that an issue is not due my special setup.
I use FastForm to create a table with 2 field. A key field of type text and a date field of type nudate -> date type in database. I run the FastForm created and add a record. I enter a key (test1) and get into the date field. A popup comes up with todays date, which I select (2019-12-30). I press save. The sql record in the DB has the info as expected. I exit the form by going "HOME"and rerun the FastForm again. I select the record just create (test1) for editting. When my cursor enters the date field the date prompt is back to 1919-12-30. So I click 100 times (is there a faster way) to get to December 2019. Next I click on the 29th. Then I click save. Now the database contains 1919-12-29 (????). How can I enter 2019-12-29 and save the record. I played with the format record for nudate. I deleted the record, recreated the nudate format record with as image dd-mm-yyyy (4 digits). No success. I assume this is a bug. How can I fix this behaviour? And use the date field?

HELP, Thanks

Jan Toonen

Re: nuDate in a form / time travel

Posted: Mon Dec 30, 2019 10:43 pm
by admin
Jan,

I followed what you did and it worked for me.

You will need to create a Date Format that contains the whole year and apply it to the nuDate Object.

You can change the year from 19 to 20 by typing.



Steven

Re: nuDate in a form / time travel

Posted: Tue Dec 31, 2019 11:08 am
by jtoonen
Hmmm

I got it to work after I changed the input tag in the form. It has something to do with defaults. If the year is only 2 digits, the logic uses 1900. If I force the year to 4 digits it also works for me....

Strange, but there is at least a work around.

Thanks

Jan

Re: nuDate in a form / time travel

Posted: Fri Jan 03, 2020 11:41 pm
by admin
.

Re: nuDate in a form / time travel

Posted: Mon Mar 30, 2020 4:17 am
by CMoxam
jtoonen wrote:Hmmm

I got it to work after I changed the input tag in the form. It has something to do with defaults. If the year is only 2 digits, the logic uses 1900. If I force the year to 4 digits it also works for me....

Strange, but there is at least a work around.

Thanks

Jan

How does one force the year into four digits?

Re: nuDate in a form / time travel

Posted: Tue Mar 31, 2020 9:29 am
by kev1n
Add a new format in the Format Builder (https://wiki.nubuilder.cloud/ ... at_Builder)
add_format.png
And then pick it:
format.png