khan786 Posted October 22, 2014 Share Posted October 22, 2014 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 More sharing options...
thescientist Posted October 22, 2014 Share Posted October 22, 2014 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 More sharing options...
khan786 Posted October 23, 2014 Author Share Posted October 23, 2014 #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 More sharing options...
Ingolme Posted October 23, 2014 Share Posted October 23, 2014 The actual Javascript code needs to be between <script> tags. Your other <script> tags are in the wrong order: jQuery-UI has to be loaded after the jQuery library. Link to comment Share on other sites More sharing options...
khan786 Posted October 24, 2014 Author Share Posted October 24, 2014 U means that my code should be like that Link to comment Share on other sites More sharing options...
Ingolme Posted October 24, 2014 Share Posted October 24, 2014 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now