PDA

View Full Version : Ext.form.field.Picker with Two Trigger



sqeidarlo
24 Sep 2013, 1:18 AM
hi
i want use from Picker to create custome date field,but my date have tree picker:miladi,shamsi and hejri.and i want use createPicker for each trigger

hit.DateEditor = Ext.define('Ext.form.field.gridDatePicker', {
extend: 'Ext.form.field.Picker',
trigger1Cls: Ext.baseCSSPrefix + 'form-date-trigger',
trigger2Cls: Ext.baseCSSPrefix + 'form-date-trigger',
createPicker1: function () {
var me = this,
format = Ext.String.format;

return new Ext.picker.Date({
pickerField: me,
ownerCt: me.ownerCt,
renderTo: document.body,
floating: true,
hidden: true,
focusOnShow: true
});
},
createPicker1: function () {
var me = this,
format = Ext.String.format;

return new Ext.picker.ShamsiDate({
pickerField: me,
ownerCt: me.ownerCt,
renderTo: document.body,
floating: true,
hidden: true,
focusOnShow: true
});
}
}

Gary Schlosberg
14 Oct 2013, 12:01 PM
Perhaps you could use the TwinTriggerField:

vm

https://fiddle.sencha.com/#fiddle/vm