TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sajid Khan
NA
56
11.4k
how to change the selected date format comes from clndr etdr
Dec 13 2016 4:19 AM
how to change the selected date format comes from calendar extender? i need 'mm-dd-yyyy' format.
here's the code:
<script language="javascript" type="text/javascript">
function CheckForBackDate(sender, args) {
var selectedDate = new Date();
selectedDate = sender._selectedDate;
var todayDate = new Date();
var grid = document.getElementById("gvDist");
var c = document.getElementsByTagName("table");
// Compare with today date
if (selectedDate.getDateOnly() > todayDate.getDateOnly())
{
sender._selectedDate = todayDate;
sender._textbox.set_Value(sender._selectedDate.format(sender._format));
alert(selectedDate.getDateOnly());
}
}
//calling from:
<cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtCloseDate"
OnClientDateSelectionChanged ="CheckForBackDate"
OnClientShown="ChangeCalendarView" PopupButtonID="imgStartDate" Format="MM-dd-yyyy" >
Reply
Answers (
2
)
How to scrap a website in node.js?
how to create a graph using javascript?