I need to extract the Day and month using Jquery so I'm left with 0913 . I also need to extract the date in this format too: 20130409, any suggestions on how to do so ? I know I can get the full date like this:
var fullDate = new Date();
Thanks!
I need to extract the Day and month using Jquery so I'm left with 0913 . I also need to extract the date in this format too: 20130409, any suggestions on how to do so ? I know I can get the full date like this:
var fullDate = new Date();
Thanks!
Get a date string from a text box using jQuery:
var dateParts,
myDate;
$calendarBox = $('input[id="myCalendarTextBox"]');
$(document).ready(function () {
$calendarBox.datepicker({
dateFormat= 'yy/mm/dd',
onClose: function () {
if($calendarBox.val() != '') {
dateParts = $calendarBox.val().split('/');
myDate = new Date(dateParts[0], dateParts[1], dateParts[2]);
}
});
});