Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

datepicker filed should not be clickable using jquery

$
0
0

I have this code

$("#FromDate").datepicker({
changeMonth: true,
changeYear: true,
yearRange: "-100:+10",
dateFormat: 'dd-M-yy',
onSelect: function (dateStr) {
var max= new Date(dateStr);
max.setDate(max.getDate() + 1);
$('#ToDate').datepicker('setDate', max);
$("#ToDate").attr('readonly', true);
}

});

ToDate datepicker date is set properly and also looked readonly. but when i click on ToDate it's shows me the date calendar. which should not populated as per my need.
Kindly suggest what should I do?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



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