CalcBuilder Forum

Date ()

User Johnjuhl 2015-06-18 15:03:01

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

J-)

Moonsoft support 2015-06-18 20:46:39

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,

...
CalcBuilder

Create dynamic calculators

Buy now!
...
List Manager

Build different lists for your site

Buy now!