Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 138163

Set different dates to default date and actual value of Jquery datepicker

$
0
0

I have two datepicker fields with preselected dates, what I need to do is when user select any new date in the first datepicker then I need to change the default value of the second datepicker to adding 10 days to newly selected date of first date picker without changing the actual value of second datepicker. Right now I am reinitializing the second datepicker and setting the default value by "defaultDate" option.

$('#x').datepicker( 'destroy' );
$('#x').datepicker({
  defaultDate : "03/21/2020"
}); 

but this is not working because datepicker already have some value so i m not able to change its default value.

Please Someone, solve my issue. If anyone wants any other information please let me know.

Any help would be greatly appreciated.


Viewing all articles
Browse latest Browse all 138163

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>