datepicker initialization changes for date display format
@@ -1129,14 +1129,21 @@ function initializeDatePickers(){
// Set stored dates
$(".dateinput").each(function () {
var dateString;
+ var pickerDate = null;
if($(this).attr('data-date')){
- dateString = $(this).attr("data-date").split("/");
+ // resource temporal date picker
+ dateString = $(this).attr("data-date").split("-");
+ pickerDate = new Date(dateString[0], dateString[1] - 1, dateString[2]);
}
else{
- dateString = $(this).attr("value").split("/");
+ // file type temporal date picker
+ if($(this).attr('value')){
+ pickerDate = new Date($(this).attr("value"));
}
- var pickerDate = new Date(dateString[0], dateString[1] - 1, dateString[2]);
+ }
+ if(pickerDate != null){
$(this).datepicker("setDate", pickerDate);
+ }
});
}
