Reputation: 11
i am currently using RadDatePicker to select a date.
Using the client API,
1. I'd like to be able to set the the min date to less than 30 days of current date and
2. maxdate to two years from current date.
Is there another way in the API to do this? Again this is all client-side JavaScript.
Upvotes: 1
Views: 6812
Reputation: 15208
See RadDatePicker Client Object.
<script type="text/javascript">
function SetDataRange(radDataPicker) {
var now = new Date();
radDataPicker.set_minDate(new Date(now.getTime() - 30 * 24 * 60 * 60 * 1000));
radDataPicker.set_maxDate(new Date(now.getFullYear() + 2, now.getMonth(), now.getDate()));
}
</script>
Upvotes: 1