Search code examples
javascriptjquerydatetimedatepickeranytime

events in AnyTime date picker


I want to fire a function when user clicks on any button under "Day Of the Month".

I found out the code for "Hour". But couldn't find the one for month.

The original problem -

I am updating an HTML span with the values selected in the AnyTime picker. I have set up earliest and latest limits. The former includes hours and minutes, the application is a scheduler, so I need only future dates, but not more than week.

I've added a function call on line 624 of anytime.js

This works great. For instance, at 5 PM, if a user selects 18th February with time as 12 AM (default), the span is updated properly. But, if he selects 15th Feb (that's today), "5 pm" gets automatically selected, being the earliest limit and the input is update properly. But there's no call to function (I don't expect one either, I haven't added anything for this).

What should I do to make sure that whenever such situation occurs, the function is called properly?

Thank you,all.


Solution

  • If I understand your question correctly: The function for processing a day-of-month press is defined inline, beginning on line #1579 of anytime.js (the uncompressed version, which you really should be modifying) or beginning on line #236 of anytimec.js (the compressed version, which is harder to figure out).