Dynamic Disabled Handler
Brought to you by:
mishoo
I would suggest moving the _init call from the create
method to the show method. This makes it possible for
the disabled handler to be dynamic. For example, one
date can be limited based on another date (which can
be changed at any time) in the same form.
Without this change, the disabled handler is not re-run
until the month changes or the first day of the week is
changed.
Logged In: YES
user_id=158787
I wonder why would you need that anyway. The
"disabledHandler" is user's function (i.e., yours) so you
can put all the dynamic stuff in it and use only one
function. Why would you need to use more than one function?
Logged In: YES
user_id=158787
I added a refresh() function. You can call this if the list
of disabled dates changed and the calendar needs refresh().
It basically acts like setting a new date, only it sets the
current one ;-) Hope it's useful.
Logged In: NO
rteteeverwve
Logged In: YES
user_id=756934
You misunderstood what I meant by dynamic. I have
disabledHandler functions which act differently depending on
user-entered values in other parts of the web page. Since,
the disabledHandler is not run every time the calendar shows,
this is not a posibility. For example, if the user shows the
calendar and then changes the dependent value, it won't
affect which dates are disabled the next time the calendar
shows.
Logged In: YES
user_id=756934
You misunderstood what I meant by dynamic. I have
disabledHandler functions which act differently depending on
user-entered values in other parts of the web page. Since,
the disabledHandler is not run every time the calendar shows,
this is not a posibility. For example, if the user shows the
calendar and then changes the dependent value, it won't
affect which dates are disabled the next time the calendar
shows.