Update Jquery datepicker multiple fields

Update Jquery datepicker multiple fields


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)

  1. <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
  2.   <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  3.   <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
  4.   <script type="text/javascript" src="/js/jquery.ui.datepicker-no.js"></script>
  5.     <script>
  6. $.datepicker.setDefaults(
  7.   $.extend(
  8.     {'dateFormat':'dd-mm-yy'},
  9.     $.datepicker.regional['no']
  10.   )
  11. );
  12.   </script>
  13.   <script>
  14.     $(function() {
  15. $('#datepickerU').datepicker({dateFormat: 'dd.mm.yy', altField: '#dbdatepickerU', altFormat: 'dd.mm.yy'});
  16.   });
  17.   </script>
  18.     <script>
  19.     $(function() {
  20. $('#datepickerM').datepicker({dateFormat: 'dd.mm.yy', altField: '#dbdatepickerM', altFormat: 'dd.mm.yy'});
  21.   });
  22.   </script>
  23.     <script>
  24.     $(function() {
  25. $('#datepickerR').datepicker({dateFormat: 'dd.mm.yy', altField: '#dbdatepickerR', altFormat: 'dd.mm.yy'});
  26.   });
  27.   </script>

The dates are inserted through 3 hidden fields.

  1.       <input type="hidden" id="dbdatepickerU" name="dbdatepickerU">
  2.       <input type="hidden" id="dbdatepickerM" name="dbdatepickerM">
  3.       <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.