Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

nuDate in a form / time travel

Questions related to using nuBuilder Forte.
Post Reply
jtoonen
Posts: 8
Joined: Mon Dec 09, 2019 7:37 pm
Location: The Netherlands
Has thanked: 2 times

nuDate in a form / time travel

Unread post 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
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: nuDate in a form / time travel

Unread post 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
jtoonen
Posts: 8
Joined: Mon Dec 09, 2019 7:37 pm
Location: The Netherlands
Has thanked: 2 times

Re: nuDate in a form / time travel

Unread post 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
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: nuDate in a form / time travel

Unread post by admin »

.
CMoxam
Posts: 10
Joined: Mon Mar 23, 2020 10:37 am

Re: nuDate in a form / time travel

Unread post 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?
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: nuDate in a form / time travel

Unread post 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
You do not have the required permissions to view the files attached to this post.
Post Reply