PDA

View Full Version : DatePicker with own values and one column



Mebel
2 Jul 2010, 8:15 AM
Hello,

the Datepicker looks very well. But i need only one column and my own values in it.
Is that possible ?

best regards
mebel

TommyMaintz
2 Jul 2010, 11:39 AM
It is possible, although slightly hard to do right now. You can look at the src/widgets/Picker.js source code. At the bottom of the file we define and create the DatePicker component. That is a great example of a custom picker and you can look at how we did it.

My suggestion though is to hold of using the picker component for now since we will probably have to change the API in order to get it more stable and functional. We hope to have a new version out in the next 3 weeks.

vsaikirankumar
12 Jul 2010, 3:00 AM
Hi Mebel,

Could you create the picker with you own values in it??I am actually trying to do it.

Mebel
12 Jul 2010, 3:40 AM
Hi Mebel,
Could you create the picker with you own values in it??I am actually trying to do it.

Not at time. But i have it already in my issues.
Please write your code in this forum. So we can to aid one another.

best regards
Matthias

Mebel
31 Jul 2010, 12:45 AM
Hello,

here is my first try to add own values. (a list of towns)

it looks fine but after selection i a get a error:

"Uncaught TypeError: Cannot call method 'get' of undefined"

Anybody a idea ?



var picker = new Ext.DatePicker( {
initComponent: function() {
this.slots = [{
text: 'Town',
name: 'town',
align: 'center',
items: [{value:"Town1", key:"New York"},{value:"Town2",key:"Tokio"}]
}];

Ext.DatePicker.superclass.initComponent.call(this);
this.on('pick', this.onPick, this);
}
});
regards
me

blessan
29 Aug 2010, 8:53 PM
Is ext.picker in the current version stable. I want to create a timepicker. Will the api change?