0

I understand very little about javascript/jquery and am trying to pass the date using the pickadate.js-3.5.3 using html/php/mysql i need to take the user inputed date from pickadate.js-3.5.3 date function and convert it into a format subtible for the DATE data type in MYSQL

This is the code i have so far;

<p id="datepairExample">Date:<input class="fieldset__input js__datepicker" name="datepicker1" value="" type="text" placeholder="Date"> </p><br/>

   <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>

   <script src="dt/js/legacy.js"></script>
    <script src="dt/js/picker.js"></script>
    <script src="dt/js/picker.date.js"></script>
    <script src="dt/js/picker.time.js"></script>
     <script>window.jQuery||document.write('<script src="pickadate.js-3.5.3/tests/jquery.2.0.0.js"><\/script>')</script>
    <script src="dt/demo.js"></script>

I have read the documents on how to do this, and have even tryed to copy and paste the code from the demo into my own page but with no luck! Any advice is welcome! Thanks

Dan
  • 183
  • 2
  • 14

1 Answers1

2

http://amsul.ca/pickadate.js/date.htm#formats

UPDAT2 2

<link rel="stylesheet" href="lib/themes/default.css" id="theme_base">
<link rel="stylesheet" href="lib/themes/default.date.css" id="theme_date">
<link rel="stylesheet" href="lib/themes/default.time.css" id="theme_time">

<!--[if lt IE 9]>
    <script>document.createElement('section')</script>
<![endif]-->


<body>

<form>
   <input class="datepicker" name="datepicker1" type="text" placeholder="Try me&hellip;">

   <input type="submit" />
</form>  




    <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script>window.jQuery||document.write('<script src="tests/jquery.2.0.0.js"><\/script>')</script>
    <script src="lib/picker.js"></script>
    <script src="lib/picker.date.js"></script>
    <script src="lib/picker.time.js"></script>


    <script>

        $(function() {
            $('.datepicker').pickadate({
                formatSubmit: 'yyyy-mm-dd',
                hiddenName: true
            })    
        });

    </script>

</body>
dm4web
  • 4,642
  • 1
  • 14
  • 20
  • How am i supposed to include that on my page? Where am i supposed to palce it ? When ever i paste that code straight onto my script it does nothing – Dan Nov 29 '14 at 14:05
  • Even with the update code still doesn't work, infact when i put your in it doesnt even load the UI to select date! – Dan Nov 29 '14 at 14:17
  • I created a whole new page and put your code directly on it and it didnt work, still wouldnt open UI tested locally and remotly – Dan Nov 29 '14 at 14:41
  • are you download plugin? – dm4web Nov 29 '14 at 15:17
  • I have the entire folder downloaded! – Dan Nov 29 '14 at 16:27
  • I have all of the scripts that are mentioned above! – Dan Nov 29 '14 at 16:28
  • probably not provide a good path to the file. See exaple: http://fiddle.jshell.net/yc86deoy/. And Study the source code http://fiddle.jshell.net/yc86deoy/show/ – dm4web Nov 29 '14 at 16:50