Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Datepicker: Add missing events

  • Loading branch information...
commit fc91df94f6316a827ea79abfd557c9826a627166 1 parent cd0ab13
@shahraship shahraship authored jzaefferer committed
Showing with 27 additions and 0 deletions.
  1. +27 −0 entries/datepicker.xml
View
27 entries/datepicker.xml
@@ -251,6 +251,33 @@
<desc>Called when the datepicker is selected. The function receives the selected date as text and the datepicker instance as parameters. <code>this</code> refers to the associated input field.</desc>
</option>
</options>
+ <events>
+ <event name="beforeShow" type="datepickerbeforeshow">
+ <desc>Can be a function that takes an input field and current datepicker instance and returns an options object to update the datepicker with. It is called just before the datepicker is displayed.</desc>
+ <argument name="input" type="jQuery"/>
+ <argument name="inst" type="jQuery"/>
+ </event>
+ <event name="beforeShowDay" type="datepickerbeforeshowday">
+ <desc>The function takes a date as a parameter and must return an array with [0] equal to true/false indicating whether or not this date is selectable, [1] equal to a CSS class name(s) or "" for the default presentation, and [2] an optional popup tooltip for this date. It is called for each day in the datepicker before it is displayed.</desc>
+ <argument name="date" type="Date"/>
+ </event>
+ <event name="onChangeMonthYear" type="datepickeronchangenonthyear">
+ <desc>Allows you to define your own event when the datepicker moves to a new month and/or year. The function receives the selected year, month (1-12), and the datepicker instance as parameters. this refers to the associated input field.</desc>
+ <argument name="year" type="Integer"/>
+ <argument name="month" type="Integer"/>
+ <argument name="inst" type="jQuery"/>
+ </event>
+ <event name="onClose" type="datepickeronclose">
+ <desc>Allows you to define your own event when the datepicker is closed, whether or not a date is selected. The function receives the selected date as text ("" if none) and the datepicker instance as parameters. this refers to the associated input field.</desc>
+ <argument name="dateTxt" type="String"/>
+ <argument name="inst" type="jQuery"/>
+ </event>
+ <event name="onSelect" type="datepickeronselect">
+ <desc>Allows you to define your own event when the datepicker is selected. The function receives the selected date as text and the datepicker instance as parameters. this refers to the associated input field.</desc>
+ <argument name="dateTxt" type="String"/>
+ <argument name="inst" type="jQuery"/>
+ </event>
+ </events>
<methods>
<xi:include href="../includes/widget-method-destroy.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<method name="dialog">
Please sign in to comment.
Something went wrong with that request. Please try again.