Umer Hayat
Umer Hayat

Reputation: 2001

Customizing jquery ui Date Picker

Is it possible to completely customize jquery-ui datepicker to match your website theme, including position of header, buttons and images. If it is possible, than what should be the approach. How to go about it? I want to (almost) redesign it completely. What are other possible options?

I have tried to change/customize it a bit using jquery Theme Roller but it does not allow to change buttons, images or overall design of the date picker box.

Any help is highly appreciated.

Upvotes: 2

Views: 5955

Answers (1)

Ravi Gadag
Ravi Gadag

Reputation: 15861

you can modify it. just go through the this link and download the files . i customized datepicker header, content, selected style. n other options . JqueryUi-Datepickr

or alternativily you can visit JqueryDatepicker n select theming tab.

this is the general mark up for date time picker. you can customize it

<div id="ui-datepicker-div" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible">
   <div class="ui-datepicker-header ui-widget-header ui-helper-clearfix ui-corner-all">
      <a class="ui-datepicker-prev ui-corner-all" title="Prev"><span class="ui-icon ui-icon-circle-triangle-w">Prev</span></a>
      <a class="ui-datepicker-next ui-corner-all" title="Next"><span class="ui-icon ui-icon-circle-triangle-e">Next</span></a>
      <div class="ui-datepicker-title">
         <span class="ui-datepicker-month">January</span><span class="ui-datepicker-year">2009</span>
      </div>
   </div>
   <table class="ui-datepicker-calendar">
      <thead>
      <tr>
         <th class="ui-datepicker-week-end"><span title="Sunday">Su</span></th>
         ...
      </tr>
      </thead>
      <tbody><tr>
         <td class="ui-datepicker-week-end ui-datepicker-other-month "> 1 </td>
         ...
      </tr>
      </tbody>
   </table>
   <div class="ui-datepicker-buttonpane ui-widget-content">
      <button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all">Today</button>
      <button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all">Done</button>
   </div>
</div>

Upvotes: 2

Related Questions