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 Calendar Lightweight Changeable Year And Month, Calendar Validation Up To the Current Date
WhatsApp
Ashwini Sh
8y
9.8
k
0
1
25
Blog
calendar_files.zip
Select a date from a textbox calendar in an ASP.NET.
It is refered from jQuery site.
Here, calendar year and months are changeable.
Year and month in dropdown are required to be selected.
Calendar validation up to the current date.
Flexible in all the Browsers.
Multiple text boxes have common code for the calendar.
For reference, attach jQuery files.
jQuery code is given below.
<script type=
"text/javascript"
>
//// calendar code
$(document).ready(
function
() {
$(
".calendar-drop"
).datepicker({
maxDate:
"+0d"
,
changeMonth:
true
,
changeYear:
true
});
</script>
An ASP.NET code is given below.
<td
class
=
"td_label"
style=
"text-align: right"
>From Date</td>
<td
class
=
"td_form_input"
>
<asp:TextBox ID=
"txtFromDate"
runat=
"server"
MaxLength=
"20"
CssClass=
"calendar-text calendar-drop"
>08/22/2016</asp:TextBox>
</td>
<td
class
=
"td_label"
style=
"text-align: right"
>To Date</td>
<td
class
=
"td_form_input"
>
<asp:TextBox ID=
"txtToDate"
runat=
"server"
MaxLength=
"20"
CssClass=
"calendar-text calendar-drop"
>01/01/2017</asp:TextBox>
File reference in an ASP.NET code is given below.
<link href=
"/Styles/jquery-ui-cal.css"
rel=
"stylesheet"
/>
<script src=
"/Scripts/jquery-1.12.4-cal.js"
type=
"text/javascript"
></script>
<script src=
"/Scripts/jquery-ui-cal.js"
type=
"text/javascript"
></script>
JQuery
Recommended related topics
Membership not found