Permalink
Browse files

Revert "Datepicker: Document 'events' as options."

This reverts commit 81c4533.
  • Loading branch information...
scottgonzalez committed Oct 21, 2012
1 parent 81c4533 commit 78f32312cce3a6c81a6c862de85cde02cc55e1cd
Showing with 13 additions and 11 deletions.
  1. +13 −11 entries/datepicker.xml
View
@@ -250,32 +250,34 @@
<argument name="inst" type="Object"/>
<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>
- <option name="beforeShow" type="Function">
+ </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"/>
- </option>
- <option name="beforeShowDay" type="Function">
+ </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"/>
- </option>
- <option name="onChangeMonthYear" type="Function">
+ </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"/>
- </option>
- <option name="onClose" type="Function">
+ </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"/>
- </option>
- <option name="onSelect" type="Function">
+ </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"/>
- </option>
- </options>
+ </event>
+ </events>
<methods>
<xi:include href="../includes/widget-method-destroy.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<method name="dialog">

2 comments on commit 78f3231

@jzaefferer

This comment has been minimized.

Show comment Hide comment
@jzaefferer

jzaefferer Oct 21, 2012

Member

Why the reverts?

Member

jzaefferer replied Oct 21, 2012

Why the reverts?

@scottgonzalez

This comment has been minimized.

Show comment Hide comment
@scottgonzalez

scottgonzalez Oct 21, 2012

Member
Please sign in to comment.