The following code part introduces a bug in apllication.js:
// script for calendar date pick
// The main code
$(function() {
$( "#datepicker" ).datepicker();
});
// This makes the pop-up show the actual db date by fixing a format difference.
$(function (){
var dateInput = $("#datepicker");
var format = 'yy-mm-dd';
dateInput.datepicker({dateFormat: format});
dateInput.datepicker('setDate', $.datepicker.parseDate(format, dateInput.val()));
});
The jquery datepicker is two times initialized, so the second initialized datepicker has no effect. Thus the default settings are used instead of the format 'yy-mm-dd'.
The following code part introduces a bug in apllication.js:
The jquery datepicker is two times initialized, so the second initialized datepicker has no effect. Thus the default settings are used instead of the format 'yy-mm-dd'.
Remove the first part in apllication.js: