Live Webinar: Prompt Engineering: Skill Everyone Must Learn Today
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
jQuery: Date Range Validation
WhatsApp
Vincent Maverick Durano
May 04
2015
2.9
k
0
0
Here's a quick example on how to disable previous dates based on the date selected from the first calendar date. You can see the actual demo here: http://jsfiddle.net/j3w726r0/
<script type=
"text/javascript"
>
$(
function
() {
$(
"#<%=TextBox1.ClientID%>"
).datepicker({
changeMonth:
true
,
changeYear:
true
,
onSelect:
function
(selected) {
$(
"#<%=TextBox2.ClientID%>"
).datepicker(
"option"
,
"minDate"
, selected)
}
});
$(
"#<%=TextBox2.ClientID%>"
).datepicker({
changeMonth:
true
,
changeYear:
true
,
onSelect:
function
(selected) {
$(
"#<%=TextBox1.ClientID%>"
).datepicker(
"option"
,
"maxDate"
, selected)
}
});
});
</script>
jQuery
Date Range Validation
Up Next
jQuery: Date Range Validation