There are 1 item(s) tagged with the keyword "beforeShow".
- Displaying: 1 - 1 of 1
- 1. jQuery datepicker disabled weekday
There is another custom setting for jQuery datapicker. Here we have discuss about how to disabled any weekday in jQuery datepicker. As you know in today's era jQuery become more and more popular and why not? It should be because jQuery does our work very easy. Recently, in our one of the project need to give date field value in one of the form. In this form date calculate dynamic with exclude weekend days (Saturday and Sunday) as per client timeline setting but client also wants their employee also change date value manually. Now what, we need to give datepicker to the text field and as we love jQuery so of course we use jQuery datepicker and see there is no default function to handle disabled weekday. We know there is a function to handle custom setting before show datapicker and before show day. i.e. there are two different function beforeShow, beforeShowDay. beforeShow function uses when you want to set before showing datepicker and beforeShowDay function uses when you want to apply setting before load each day. So we use beforeShowDay function to disabled day. It's very simple and short code for disabling weekday. Let's understand by example.
- By Bharat Patel