I've read several stackoverflow posts on how to get the value from the datepicker field. I found out that there are two methods to do that:
var method1 = $('#dateInput').datepicker('getDate');
var method2 = $('#dateInput').val();
However, method2 gives me an empty string. Why is that so? I know that .val() is a method that will get the value of the element.
$('#dateInput input').val()?$('#dateInput')was returning div with no property value where$('#dateInput input')return input with property value