Forum
Calc Builder Support
Calc Builder supportForums
No se permite escribir sin estar logado. Por favor, login
Re: Type Date - Can I dsable Saturday and Sunday? 14.07.2017 08:30
Hi,
yes, you can disable weekends, adding a line at the first js tabs of your calculator (on loaded page). If your field date is called, for ex, mydate , you can write:
CB('input[fldname=mydate]').datepicker({ beforeShowDay: CB.datepicker.noWeekends });
This should do the work.
Another quick tip, you can also force the day selected to be in the future, disabling past dates, this way:
CB('input[fldname=fecha]').datepicker({ minDate: 0,beforeShowDay: CB.datepicker.noWeekends });
playing with minDate number you could also set the day selected must be always at least 5 days in the future..
CB('input[fldname=fecha]').datepicker({ minDate: 5,beforeShowDay: CB.datepicker.noWeekends });
..etc
Hope this helps, regards
Moonsoft Team
www.moonsoft.es
yes, you can disable weekends, adding a line at the first js tabs of your calculator (on loaded page). If your field date is called, for ex, mydate , you can write:
CB('input[fldname=mydate]').datepicker({ beforeShowDay: CB.datepicker.noWeekends });
This should do the work.
Another quick tip, you can also force the day selected to be in the future, disabling past dates, this way:
CB('input[fldname=fecha]').datepicker({ minDate: 0,beforeShowDay: CB.datepicker.noWeekends });
playing with minDate number you could also set the day selected must be always at least 5 days in the future..
CB('input[fldname=fecha]').datepicker({ minDate: 5,beforeShowDay: CB.datepicker.noWeekends });
..etc
Hope this helps, regards
Moonsoft Team
www.moonsoft.es