Skip to content

Instantly share code, notes, and snippets.

@stevepond
Created July 29, 2011 15:35
Show Gist options
  • Select an option

  • Save stevepond/1114052 to your computer and use it in GitHub Desktop.

Select an option

Save stevepond/1114052 to your computer and use it in GitHub Desktop.
The new picker implementation should be as easy as the following:
{
name: 'depDate',
label: 'Departure:',
xtype: 'datepicker'
}
where date is the field name you are using for the date picker, and label is the label to display.
A dual implementation would look like this.....
{
xtype: "datepicker",
datefields: [{
name: 'depDate',
label: 'Departure:',
buttons: {
xtype: 'flight-time-buttons',
name: 'time1'
}
},
{
name: 'arrDate',
label: 'Return:',
buttons: {
xtype: 'flight-time-buttons',
name: 'time2'
}
}]
},
The 'datepicker' type serves as a container for 2 datepickers. It handles the selections using its own handler.
You may need to override the Handler logic for your specific implementation.
For example, the default logic would automatically set the (minimum selectable date) on the Arrival Datepicker to the selection of the Departure Datepicker.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment