JavaScript runtime error: Unable to set property 'currentDay' of undefined or null reference
JavaScript
$(function () { $('#txtDate').datepicker({ showOn: "button", buttonImage: "calender_icon.gif", width: 18, height: 18, buttonText: "", buttonImageOnly: true, dateFormat: 'mm/dd/yy', onSelect: function () { $(this).datetimepicker("hide"); $('#errormessage').html(''); } }); });How to resolve this error


Biswa Pujarini MohapatraRank #465 · 5.4K reputationPosted Jan 22, 2014, 8:22 AM EST
$('#txtDate).datepicker({ changeYear: true, changeMonth: true '', defaultDate: d});
try this code
Anubhav ChaudharyRank #29 · 42K reputationPosted Jan 21, 2014, 9:03 PM EST
http://www.c-sharpcorner.com/UploadFile/cd7c2e/how-to-calculate-age-by-inserting-dob-manually/
On this Article you will get much more functionality than you are trying, you can try them also or can omit them and can just use what are asking for
Biswa Pujarini MohapatraRank #465 · 5.4K reputationPosted Jan 21, 2014, 10:47 PM EST
http://jqueryui.com/datepicker/#option-currentText
vasanthasilvary55 reputationPosted Jan 22, 2014, 12:42 AM EST
Anubhav ChaudharyRank #29 · 42K reputationPosted Jan 22, 2014, 12:59 AM EST
Biswa Pujarini MohapatraRank #465 · 5.4K reputationPosted Jan 22, 2014, 1:58 AM EST
http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerDefaultToday2.html
vasanthasilvary55 reputationPosted Jan 22, 2014, 2:55 AM EST
http://jqueryui.com/datepicker/
is only appearing for
http://jqueryui.com/datepicker/#option-currenttext
vasanthasilvary55 reputationPosted Jan 22, 2014, 2:56 AM EST
http://2005.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerDefaultToday2.htm
vasanthasilvary55 reputationPosted Jan 22, 2014, 4:05 AM EST
$( ".selector" ).datepicker({ currentText: "Now" });
I am getting current day undefined error
vasanthasilvary55 reputationPosted Jan 22, 2014, 9:38 PM EST
Microsoft JScript runtime error: Unable to set value of the property 'currentDay': object is null or undefined
from jquery-ui-1.8.17.custom.min.js
vasanthasilvary55 reputationPosted Jan 22, 2014, 10:33 PM EST
solution is
we need to provide unique ids
Biswa Pujarini MohapatraRank #465 · 5.4K reputationPosted Jan 22, 2014, 10:37 PM EST
it seems the issue comes if there are duplicate id in your project
see this thread
http://blog.aardvarksoft.co.uk/index.php/2012/03/15/jquery-calendar-error-cannot-set-property-currentday-of-undefined/
try remove the duplicate id or rename the id if you have