Question

Asked on 2011-05-09 at 02:18:47ID: 27360735

jquery ui datepicker - date input not showing...

by: cycledude500

Rating9.2Excellent

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').datepicker('option', {dateFormat: "dd/mm/yy"});

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:

Select allOpen in new window

Related Solutions

Solution

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.

About this Solution

View This Solution - Start Your 30 Day Free Trial
Zone
general
Tags
jquery ui datepicker - date input not showing...
Participating Experts
1
Solution Grade
A

Replies

 by: Roads_Roads

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.

 by: cycledude

Posted on 2011-05-09 at 04:17:16ID: 36812461

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.

 by: cycledude

Posted on 2011-05-09 at 04:32:25ID: 36812462

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.

 by: Roads_Roads

Posted on 2011-05-09 at 04:36:38ID: 36812463

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.

 by: Roads_Roads

Posted on 2011-05-09 at 04:39:24ID: 36812464

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.

 by: Roads_Roads

Posted on 2011-05-09 at 04:40:15ID: 36812465

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.

 by: cycledude

Posted on 2011-05-09 at 05:23:30ID: 36812466

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.

Log In

Forgot your password?Sign up

Top Experts

  1. mplungjan

    1,840

    0 points yesterday

    Profile

BrowseAre you an Expert?