Update Jquery datepicker multiple fields
Hi
I'm using datepicker on 3 different textfields on one page, all works fine.
Dates are inserted into an Acces database.
However, when I try to update one of the inserted dates, one or more dates are deleted from the db.
The update page reads the dates correct. But if I touch one of them/update the date, one or two dates just simply dissapear from the db.
I'm using Dreamweaver with standard insert/update function. (.asp/ MS Access)
- <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
- <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
- <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
- <script type="text/javascript" src="/js/jquery.ui.datepicker-no.js"></script>
- <script>
- $.datepicker.setDefaults(
- $.extend(
- {'dateFormat':'dd-mm-yy'},
- $.datepicker.regional['no']
- )
- );
- </script>
- <script>
- $(function() {
- $('#datepickerU').datepicker({dateFormat: 'dd.mm.yy', altField: '#dbdatepickerU', altFormat: 'dd.mm.yy'});
- });
- </script>
- <script>
- $(function() {
- $('#datepickerM').datepicker({dateFormat: 'dd.mm.yy', altField: '#dbdatepickerM', altFormat: 'dd.mm.yy'});
- });
- </script>
- <script>
- $(function() {
- $('#datepickerR').datepicker({dateFormat: 'dd.mm.yy', altField: '#dbdatepickerR', altFormat: 'dd.mm.yy'});
- });
- </script>
The dates are inserted through 3 hidden fields.
- <input type="hidden" id="dbdatepickerU" name="dbdatepickerU">
- <input type="hidden" id="dbdatepickerM" name="dbdatepickerM">
- <input type="hidden" id="dbdatepickerR" name="dbdatepickerR">
Have not used Jquery before so the learning curve is quite steep.
The code used for this might not be 100%, but I finally got it working for inserting.
If I could just update as well without losing dates from the db all would be good.