2

I wanted to change the styles of calendar panel using extjs.I am using extjs calendarpanel and datepicker in my EHR application like following link

http://dev.sencha.com/deploy/ext-3.4.0/examples/calendar/index.html

when selecting a date from datepicker if the day is a public holiday,(that is get from database on select event )i want to change the background color of calendarpanel to gray color.Is it possible?is any way to change the css class properties using extjs3.3.

2 Answers 2

1

You can assign a custom class to the cell you need, for example here is how it works with the 15. day of month:

Ext.get(Ext.get('mydatepicker').query('td.x-datepicker-active[title*="15,"]')[0].id).addCls("mynewclass")

You can take a look to that Extjs 2/3 plugin

Sign up to request clarification or add additional context in comments.

1 Comment

the code selects the td with title "15" from your calendar picker and add a css class "mynewclass" to it. You have to declare the css for it
1

you can override the extjs css with the using cls property for the particular element.Here is i am using own css class for the text.

{ 
 text:'Create App',
cls:'app42CreateApp',
 },

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.