Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
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
7y
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
Up Next
Customizing a Model Validation Response which results in an HTTP 400 Error Code
Ebook Download
View all
An In-Depth Guide to C# Generics in .NET 6, .NET 7, and .NET 8 with 70+ Code Samples
Read by 2.3k people
Download Now!
Learn
View all
Membership not found