Forum


Calc Builder Support

Calc Builder support
Forums
Public write access is disabled. Please login

Type Date - Can I dsable Saturday and Sunday? 13.07.2017 16:51

Hi Moonsoft-Team,

can I disable the date on Saturday and Sunday?

So that it is not clickable?

Thank you

Best regards

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

Re: Type Date - Can I dsable Saturday and Sunday? 18.07.2017 11:12

Hi Moonsoft Team,

it's work!

Thanks for the detail tips.

Best regards
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect

Our clients' feedback