13 Dec 2012 1:12 AM #1
I'm trying to customize the existing datepicker (com.sencha.gxt.widget.core.client.DatePicker) (GXT3.0.1). Ex: Hiding the today button. I've tried to duplicate the DatePicker class to customize, but it didn't worked out. Please suggest the better approach
13 Dec 2012 6:33 AM #2I've tried to duplicate the DatePicker class to customize, but it didn't worked out.
13 Dec 2012 7:34 AM #3
I want to hide 'Today' button in DatePicker. For that I've created an object to DatePicker in my class and tried to hide it by using css. But not getting how to hide component inside component (i.e.,today button).
2nd approach: Copied the entire DatePicker code along with all the related API classes to my local and tried to customize it. But it is giving 'Deffered binding exception'. Seems I missed something to inherit.
Could you please suggest me the good approach apart from these.
13 Dec 2012 9:01 AM #4
Subclass it, and set todayBtn.setVisible(false)?
Make a new appearance implementation with a) todayButtonSelector() pointing at an invisible element, and b) the space normally used for that region collapsed?
These are the first two options I thought of - both look reasonable. If you have problems, please actually share the *code* you are writing - I can't tell if your CSS doesn't work because what you wrote doesn't make sense or if there is a problem with changing it with CSS.
14 Dec 2012 12:03 AM #5
Thanks Colin. Now I'm able to hide today button. Could you please let me know how to hide leftmonthSelector as it is not declared in Datepicker class as 'protected TextButton todayBtn; '.
Not getting where it is declared.
14 Dec 2012 8:44 AM #6
You really aren't giving me a lot to go on - the problem changes and gets more complex every post. That's fine if you were actually reading the code that I'm pointing you at, but you seem to just be waiting for me to do it for you.
The second option I gave in the last post is what you want if you are further customizing the datepicker - start with the appearance object, and remove pieces you don't need.