how to disabled day busy

321 views
Skip to first unread message

Carlos Rocha

unread,
Mar 21, 2014, 10:42:39 PM3/21/14
to bootstrap-...@googlegroups.com
Hi, 

as I do, some days are off, for example I have stored on my bd a date range you are busy, I want to appear in datepicker not available to choose from. how can I do this? 
and if I can where I read?

thank you any help or idea!

Andrew Rowls

unread,
Mar 26, 2014, 5:28:35 PM3/26/14
to Carlos Rocha, bootstrap-...@googlegroups.com
http://bootstrap-datepicker.readthedocs.org/en/release/options.html#beforeshowday

Provide a beforeShowDay callback, and check if the date is in your list of disabled dates; if it is, return `false`.

I understand this isn't as convenient as a "disabled dates" declarative option, but it's the best option the current release has for that functionality.
> --
> You received this message because you are subscribed to the Google Groups "bootstrap-datepicker" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bootstrap-datepi...@googlegroups.com <mailto:bootstrap-datepi...@googlegroups.com>.
> To post to this group, send email to bootstrap-...@googlegroups.com <mailto:bootstrap-...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/bootstrap-datepicker/a7931297-42dd-4b73-aae6-c69f34e7fe86%40googlegroups.com <https://groups.google.com/d/msgid/bootstrap-datepicker/a7931297-42dd-4b73-aae6-c69f34e7fe86%40googlegroups.com?utm_medium=email&utm_source=footer>.

carlos

unread,
Mar 26, 2014, 5:56:24 PM3/26/14
to and...@eternicode.com, bootstrap-...@googlegroups.com
Ok , thank you! i read this option, I hope that in the next release has the option to disable an array of specific days

Cheers


On Wed, Mar 26, 2014 at 3:28 PM, Andrew Rowls <and...@eternicode.com> wrote:
http://bootstrap-datepicker.readthedocs.org/en/release/options.html#beforeshowday

Provide a beforeShowDay callback, and check if the date is in your list of disabled dates; if it is, return `false`.

I understand this isn't as convenient as a "disabled dates" declarative option, but it's the best option the current release has for that functionality.


On 03/21/2014 10:42 PM, Carlos Rocha wrote:
Hi,

as I do, some days are off, for example I have stored on my bd a date range you are busy, I want to appear in datepicker not available to choose from. how can I do this?
and if I can where I read?

thank you any help or idea!


--
You received this message because you are subscribed to the Google Groups "bootstrap-datepicker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bootstrap-datepicker+unsub...@googlegroups.com <mailto:bootstrap-datepicker+unsub...@googlegroups.com>.
To post to this group, send email to bootstrap-datepicker@googlegroups.com <mailto:bootstrap-datepicker@googlegroups.com>.

Андрей Скрыпник

unread,
Aug 26, 2014, 3:04:58 AM8/26/14
to bootstrap-...@googlegroups.com, croch...@gmail.com, and...@eternicode.com
pls can you give a link to some example how to use it properly. bcs i need to disable array of dates received from server via ajax request. So i make request to server, received array of dates and after re-init boostrap datepicker.For another object i should do the same, receive array of dates and re-init datepicker again. Pls help me how to do it with date picker. THANKS in advance!

среда, 26 марта 2014 г., 23:28:35 UTC+2 пользователь eternicode написал:
http://bootstrap-datepicker.readthedocs.org/en/release/options.html#beforeshowday

Provide a beforeShowDay callback, and check if the date is in your list of disabled dates; if it is, return `false`.

I understand this isn't as convenient as a "disabled dates" declarative option, but it's the best option the current release has for that functionality.


On 03/21/2014 10:42 PM, Carlos Rocha wrote:
> Hi,
>
> as I do, some days are off, for example I have stored on my bd a date range you are busy, I want to appear in datepicker not available to choose from. how can I do this?
> and if I can where I read?
>
> thank you any help or idea!
>
> --
> You received this message because you are subscribed to the Google Groups "bootstrap-datepicker" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bootstrap-datepicker+unsub...@googlegroups.com <mailto:bootstrap-datepicker+unsub...@googlegroups.com>.
Reply all
Reply to author
Forward
0 new messages