Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.
Hi Experts
I need a little advice with the datepicker in jqui...
I have an input[type=text] with an id='datepicker'
when the textbox is clicked up pops the jqui datepicker as you would expect, and you can select a date and the textbox will have the date entered into it. All as you would expect.
However, the form is also used to edit existing data in a database... as such the text inputs get populated with data from the database to allow the user to edit it.
The problem I have is that the datepicker text input is not always displaying the date that is loaded from the database.... sometimes it does display and other times it does not... I checked the html and the value is in there it is just not being displayed.
I can only think it could be due to my changing the default date format of the datepicker to dd/mm/yy
$('#datepicker').datepicke
the date I am putting into the text input is also in that format
I am calling this script AFTER the data is put into the text inputs...
Any ideas why it is not working?
<script type='text/javascript' src='../js/ui/jquery.ui.core.js'></script>
<script type='text/javascript' src='../js/ui/jquery.ui.datepicker.js'></script>
<script type='text/javascript'>
$(function() {
$('#datepicker').datepicker();
$('#datepicker').datepicker('option', {dateFormat: "dd/mm/yy"});
});
</script>
1: 2: 3: 4: 5: 6: 7: 8:
Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.
Posted on 2011-05-09 at 03:13:23ID: 36812460
All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.