• Resolved alejandroorozco

    (@alejandroorozco)


    Hello,
    I’m using datepicker for a booking solution. Booking will be allowed only for working days. Is easy to disable weekends, but also, I need to disable other holidays. Is it possible via jquery?
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @alejandroorozco thank you for using the plugin.

    I can try and implement this feature in a future update (maybe a couple of weeks from now). Basically the same way I have added the option to set a list of allowed times, I can add a field to set a list of dates to disable.

    For now you can use jQuery yes. You can use:

    jQuery('#cm-datetimepicker').datetimepicker('setOptions',{
    	disabledDates:['04/25/2019']
    });

    Where ‘#cm-datetimepicker’ would be replaced by your selector and the dates would be in the format you have. More on the script documentation page:

    https://xdsoft.net/jqplugins/datetimepicker/#weekends

    Hope it helps.
    Greetings, Carlos

    Hi @alejandroorozco just released an update where you can manually add dates to in the advanced settings to be disabled. Check if it works well.
    Greetings, Carlos

    Hello @carlosmoreirapt,

    is it possible just to disable month and day? For example 09 13.

    For now you need to put years also for example 2019-09-13. That means every year you need to update it..

    Hi @marcizus thank you for using the plugin.
    Currently it’s the only way to do that.
    You can however already do it for the next years, no need to change it every year.
    For the next 10 years, for example, you can add:
    2019-09-13,2020-09-13,2021-09-13,2022-09-13,2023-09-13,2024-09-13,2025-09-13,2026-09-13,2027-09-13,2028-09-13,2029-09-13

    Hope it helps.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disabled Holidays’ is closed to new replies.