Skip to main content
CalcBuilder logo
CalcBuilder Forum

Date ()

User Johnjuhl

How do I set a field to always show "today" - and not allowing the user to change that ?

J-)

Moonsoft support

Hi,

You can use datepicker functions on a field typed 'date'. Add this code on first tab of 'Javascript events'on your calculator, replacing 'today' with the variable name of your field.:

CB("input").datepicker({ minDate: 0, maxDate: 0});
CB("input").datepicker( "setDate", "+0" );

More information about datepicker can be found here: https://www.moonsoft.es/en/help/2-cbsupport/2809-validate-date

Regards,

...
Support/development 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!
...
Support/development

Perfect for small code changes or to correct any bug at your site

Buy now!