Hello All,
I am getting this strange bug. I'm using a jquery ui date picker in my Spring MVC application.
The controller is populating the form which are populating on the jsp.
<form:form modelAttribute="form8DContainment" method="post">
<form:input path="finalDate"/>
<form:input path="finalDate"/>
</form:form>
I have applied datepicker something like this for these related date fields
var dates = $( "#initalDate, #finalDate" ).datepicker({
changeMonth: true,
numberOfMonths: 1,
onSelect: function( selectedDate ) {
var option = this.id == "initalDate" ? "minDate" : "maxDate",
instance = $( this ).data( "datepicker" );
date = $.datepicker.parseDate(
instance.settings.dateFormat ||
$.datepicker._defaults.dateFormat,
selectedDate, instance.settings );
dates.not( this ).datepicker( "option", option, date );
}
});
But once the page is loaded the initial and final date fields are blank, but if I remove the datepicker code the dates gets populated fine. Am I missing something here?
Thanks,
Ravi