Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

update date field

johan
Posts: 392
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium

Re: update date field

Unread post by johan »

Zazzium,

I've included dateJS -all in productionnu2 of Nubuilder and changed my field settings to yyyy-M-dd.
Alert start_date returns date in format dd-M-yyyy so that part is ok.
Alert of end_date gives no return. I've set var end_date = Date.today(); Also whitout result. :(

Johan
zazzium
Posts: 84
Joined: Mon Jul 04, 2011 12:52 am

Re: update date field

Unread post by zazzium »

use firebug, this way u can see what part of the script causes problems.
johan
Posts: 392
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium

Re: update date field

Unread post by johan »

zazzium,

With firebug get error : Date.today() is not a function. So I think I've done something wrong installing datejs.

If I run test.html of datejs everything is ok.

Any idea?
Thanks again
Johan
zazzium
Posts: 84
Joined: Mon Jul 04, 2011 12:52 am

Re: update date field

Unread post by zazzium »

try to include the date.js file on the form u need it.

make a new HTML object on the form, and insert in the HTML section

Code: Select all

<script src="js/date.js"></script>
just in case make it the first object on the form

(be sure the date.js is located in the 'js' folder in your nuBuilder 'productionnu2')
johan
Posts: 392
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium

Re: update date field

Unread post by johan »

Zazzium

It works with an html object on top of the form having this code

Code: Select all

<script type="text/javascript" src="date.js"></script>
Thanks for all your help.

Maybe an idea to integrate Datejs in Nubuilder, it does a nice job.

Johan
zazzium
Posts: 84
Joined: Mon Jul 04, 2011 12:52 am

Re: update date field

Unread post by zazzium »

glad u sorted it out
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: update date field

Unread post by admin »

.
Locked