Reputation: 389
I'm trying to activate the Ext.Picker from a toolbar button. I can't find a way to have Sencha Touch populate the picker with the Month/Day/Year data that is found when using the following in a textfield in a form.
picker: yearFrom: 1900
Below is the handler for the button and the code to call the picker and show it - I just can't find any documentation on how to load the date data. I know how to do add data manually I'm just looking for a possible built in method.
handler: function(){
var picker = new Ext.Picker({ // some sort of method to fill in year/month/day data goes here }); picker.show();
}
Upvotes: 1
Views: 1284
Reputation: 1903
var dpo={};
dpo.useTitles=true;
dpo.value={};
dpo.value.day=23;
dpo.value.month=5;
dpo.value.year=2000;
var datePicker = new Ext.DatePicker(dpo);
datePicker.show()
Upvotes: 2