Hi,
Code: Select all
I have a datepicker named dpini placed inside a page named HistoricoPage. I placed the following code inside PageShow event of HistoricoPage: var dataini = $('#dpini').datepicker({ dateFormat: 'dd-mm-yy' }).val();
alert (dataini);
I want that, entering the page, to show the selected date in the alert. The problem is: the alert shows the message "undefined". Is there anything wrong with the code above? How can I get the date returned by datepicker as string?
Thank you