I'm trying to add a hidden field when a user selects a date to show the day that it rests on. I looked in the documentation on using the dateFormat but can't seem to render this. So the date shows up in the field like: 01/01/2024, but I want the option to either add the day in the field value or have it as a hidden field and I can display it elsewhere. IE: 01/01/2024 Monday
https://jqueryui.com/datepicker/ The jQuery DateTimePicker
$("input.Date").datepicker({
onSelect: function (dateText, inst) {
$("#" + this.id + "_month").attr("value", new Date(dateText).getMonth() + 1);
$("#" + this.id + "_day").attr("value", new Date(dateText).getDate());
$("#" + this.id + "_year").attr("value", new Date(dateText).getFullYear());
$("#" + this.id + "_changeTime").val(Date.now()).trigger('change');
},
changeMonth: true,
changeYear: true,
yearRange: '1900:2050',
showButtonPanel: true,
showOn: 'both',
buttonText: 'Date',
buttonImageOnly: true,
closeText: 'Close',
showAnim: '',
dayNamesShort: true
});