Oh no! Some styles failed to load. 😵 Please try reloading this page
Menu â–¾ â–´

#8 Dynamic Disabled Handler

open-fixed
nobody
None
5
2004-05-12
2003-04-14
Mark Bajema
No

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.

Discussion

  • Mihai Bazon

    Mihai Bazon - 2003-06-22

    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?

     
  • Mihai Bazon

    Mihai Bazon - 2003-07-02
    • status: open --> closed-fixed
     
  • Mihai Bazon

    Mihai Bazon - 2003-07-02

    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.

     
  • Nobody/Anonymous

    Logged In: NO

    rteteeverwve

     
  • Mark Bajema

    Mark Bajema - 2004-05-12
    • status: closed-fixed --> open-fixed
     
  • Mark Bajema

    Mark Bajema - 2004-05-12

    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.

     
  • Mark Bajema

    Mark Bajema - 2004-05-12

    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.

     

Log in to post a comment.