Jump to content

Date picker problem...


khan786
 Share

Recommended Posts

i have past

<script src="/js/jquery-ui-1.8.15.custom.min.js"></script> <script src="/js/jquery-1.6.2.min.js"></script><link rel="/styles/stylesheet" href="jquery/jqueryCalendar.css">

 

in header tag.....

and

jQuery(function() { jQuery( "#startDate" ).datepicker(); });

in document.ready function but the calender is not opened ..whay......i have paste the js file in folder as mentioned...

Link to comment
Share on other sites

You should be checking your browsers developer tools for errors, but from what you provided, the first thing I see as an issue is that you are included jquery-ui _before_ jquery. It should be loaded after jquery.

http://learn.jquery.com/jquery-ui/getting-started/

 

Aside from that, make sure you also have an element called #startDate.

Link to comment
Share on other sites

#startdate is the text item in which date is returned. i also tried to put these code in header part of page like as

<head>

<script src="/js/jquery-ui-1.8.15.custom.min.js"></script> <script src="/js/jquery-1.6.2.min.js"></script><link rel="/styles/stylesheet" href="jquery/jqueryCalendar.css">

jQuery(function() { jQuery( "#startDate" ).datepicker(); });

 

</head>

still not worked???

Link to comment
Share on other sites

I'm not sure if you understood. The browser runs the code in the order it is found, which is why order matters.

I can't guarantee that this is the only problem you have to solve, but it's one of them.

 

Rearrange this:

<script src="/js/jquery-ui-1.8.15.custom.min.js"></script><script src="/js/jquery-1.6.2.min.js"></script>

to this:

<script src="/js/jquery-1.6.2.min.js"></script><script src="/js/jquery-ui-1.8.15.custom.min.js"></script>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...