javascript - jQuery Datepicker issues with minDate & maxDate -


currently using following code in order setting date picker functionality -

$("#datepicker").click(function() {         $(this).datepicker().datepicker( "show" ); }); 

but if remove "show" parameter. doesn't work , want add more parameters mindate, maxdate.

please how can "show" parameter.

thanks in advance!!

you can pass options like

$("#datepicker").click(function () {     $(this).datepicker({         maxdate: yourmaxdate,         mindate: yourmindate     }).datepicker("show"); }); 

i don't know why using click handler initialize datepicker.... can do

$("#datepicker").datepicker({     maxdate: yourmaxdate,     mindate: yourmindate }); 

demo: fiddle


after plugin initialization, if want update value of options, can use option method

$("#datepicker").datepicker('option', 'optioname', optionvalue) 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -