Current code:
function validateInput() {
console.log($(this).val())
}
$("#element")
.datepicker({
todayHighlight: true,
weekStart: 0,
format: "yyyy-mm-dd",
onClose: function() {
validate.validateInput()
}
})
Outcome/Issue:
When I do this, I am getting nothing, even if I pick any date on the datepicker. I want to be able to get the current selected value if selected or null if not. Am I doing this correctly?