I have a table, each line has a button which opens a Bootstrap Popover
, containing 2 Bootstrap Datepicker
controls. They work seemingly well enough when I click on the calendar or on the input field, they open, I can choose a new date, and it gets properly displayed.
The problem is that although I can see the proper values in the input field, I can't access those by any means that I know.
$('#<ID of the input>').val()
shows the original value, what it had when I loaded the page. I tried to use the browser's inspector, to make sure there is no duplicate ID, and the original input has not been replaced by the Datepicker, but seemingly all is OK.
Using the getDate
method of the Datepicker gives a similar result, it does always return the original value no matter how many time I change it.
How can I get the currently set value with jQuery
?