Disabling/Enabling array with dates

125 views
Skip to first unread message

Marek

unread,
Jan 23, 2018, 5:21:27 PM1/23/18
to bootstrap-datepicker
Hi,

I was using this datepicker for a while and recently I needed to disable/enable certain date ranges in the datepicker. I have managed to work around it with some javascript. 

I thought it might be worth contributing to the project but before starting work I just wanted to ask if that functionality would be useful and make sure that I am not duplicating somebody's work.

Juan Boada

unread,
Jan 24, 2018, 4:49:05 PM1/24/18
to bootstrap-datepicker
Hi Marek,

The datepicker has an option to disable dates, you can take a look here http://bootstrap-datepicker.readthedocs.io/en/latest/options.html#datesdisabled

I hope this help you.

JB

Marek

unread,
Jan 25, 2018, 5:00:22 AM1/25/18
to bootstrap-datepicker
I can't believe I missed that.
What about different scenario, where I want to disable everything and enable only few dates? So far I used beforeShowDay to set this.

Juan Boada

unread,
Jan 25, 2018, 5:19:06 PM1/25/18
to bootstrap-datepicker
HI Marek,

Mmm Interesting question, I have never been in a scenario like you mentioned. I think the function you mentioned before, it could help you.

JB

EDGAR JOSE RODRIGUEZ SOLANO

unread,
Jan 31, 2018, 9:55:21 AM1/31/18
to bootstrap-datepicker
Hi, excuse me my english, im colombian

Im using this excellent app, but i need disable certain date ranges, for example. '2018/02/01' - '2018/02/15' but not recognize the '-' only the ','

What can i do 

thanks
Reply all
Reply to author
Forward
0 new messages