May 16, 2010

Reduce Size of the jQuery DatePicker




I often use the jQuery ui-lightness theme for my DatePicker, which I feel is quite nice. However by default, the DatePicker layout is quite ‘explosive’ and displays with big fonts.

jQuery UI DatePicker

However there is a simple way to change that with a small amount of css. Here’s some sample CSS to reduce the font-size of the DatePicker to reduce its size and change some styling

<style type="text/css">
.ui-datepicker {
font-family:Garamond;
font-size: 11px;
margin-left:10px
}
</style>

Now if you run the same code, the DatePicker shows up like this:

jQuery UI DatePicker



'Like' us on our FaceBook page if you find this blog useful. Thanks!


Did you like this post?
kick it on DotNetKicks.com Save on Delicious
subscribe via rss subscribe via e-mail
print this post follow me on twitter


About The Author

Suprotim Agarwal, ASP.NET Architecture MVP works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

Suprotim is also the founder and primary contributor to DevCurry, DotNetCurry and SQLServerCurry. He has also written an EBook 51 Recipes using jQuery with ASP.NET Controls.

Follow him on twitter @suprotimagarwal

comments

6 Responses to "Reduce Size of the jQuery DatePicker"
  1. ranjan said...
    June 16, 2010 2:30 AM

    good one - it works..

  2. Tulasi_rams said...
    February 9, 2011 12:42 AM

    Good One Thank You

  3. Xprt said...
    March 2, 2011 10:12 AM

    Thanks a lot .... it worked

  4. Uli Becker said...
    July 28, 2011 6:09 AM

    After a lot of googling: your's is simple and works! Thank you.

  5. Miguel Santaella said...
    January 4, 2012 11:54 PM

    Thank you!!

  6. Unknown said...
    April 27, 2012 1:53 AM

    Thank U , It worked like Charm..

 

Copyright © 2009-2012 All Rights Reserved for DevCurry.com by Suprotim Agarwal | Terms and Conditions