Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I hide the next/today/previous navigation in jQuery DatePicker and turn off animations?

How do I hide the prev/today/next navigation in jQuery DatePicker?

I'm happy with just the Month and Year drop down boxes.

Also how do I disable the animations?

@tvanfosson - I already tried hideIfNoPrevNext but that only works if you don't have a date range that spans two months.

The duration option did the trick at turning off the animations though.

Cheers.

like image 849
Kev Avatar asked Nov 25 '08 02:11

Kev


2 Answers

You can find the options for the DatePicker control at http://docs.jquery.com/UI/Datepicker/datepicker#options. Specifically, I think you want to set hideIfNoPrevNext to true and set duration to ''.

  $('#cal').datepicker( { hideIfNoPrevNext: true, duration: '' } );
like image 101
tvanfosson Avatar answered Oct 12 '22 09:10

tvanfosson


Just hide buttons

$("div.ui-datepicker-header a.ui-datepicker-prev,div.ui-datepicker-header a.ui-datepicker-next").hide();
like image 25
ukko Avatar answered Oct 12 '22 08:10

ukko