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

9 comments:

  1. good one - it works..

    ReplyDelete
  2. Thanks a lot .... it worked

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

    ReplyDelete
  4. Thank U , It worked like Charm..

    ReplyDelete
  5. just another thanks!

    ReplyDelete
  6. Wow.. Nice one... Thanks a lot.. ;)

    ReplyDelete
  7. You do not know how long I have been looking for this solution. Why jQuery doesn't provide this type of solution on their site is beyond me! Maybe too simple, but us newbies surely appreciate!

    Every app site sound have a FAQ for newbies trying to figure out how to customize something with out being a wiz. We all have to star somewhere! ;)

    Thank you Suprotim Agarwal (MVP)!

    Best regards,
    Abdul Yaseff

    ReplyDelete