PDA

View Full Version : Problem while making ext js date field editable



ps_sonal
4 May 2011, 5:10 AM
HI All,
I am facing an issue while working on extjs .

When we make any ext js datefield/drop down, non- editable by using its property:-
editable:false

then we click on field label it automatically shows/opens up its date picker.

Can somebody please suggest something on this.

Thanks

Tim Toady
4 May 2011, 5:17 AM
Editable is to allow/prevent typing in the date. Are you wanting to use the disabled property? Or perhaps the readOnly property?

ps_sonal
5 May 2011, 4:42 AM
Editable is to allow/prevent typing in the date. Are you wanting to use the disabled property? Or perhaps the readOnly property?

Thanks for your response,

We want to prevent typing in datefield and for this we are using this property.
So that user can only select date from date picker shown.

The issue is :-it opens a datepicker not only when we click on date field but also when we click on its label.
we want to prevent the same.
please suggest

Tim Toady
5 May 2011, 6:36 AM
To me the default behavior makes sense, but I suppose if you wanted to stop it from happening you could add a listener like this to your datefield.


render: function() {
this.mon(this.label,'click', function(e) {
e.stopEvent();
})
}

ps_sonal
5 May 2011, 10:57 PM
Hi,
Thanks for giving this idea.
It is working fine



Thanks