Pman.Dialog.CoreNotifyRecur.bjs
[Pman.Core] / Pman.Dialog.CoreNotifyRecur.js
index ac21995..0088d0a 100644 (file)
@@ -96,13 +96,19 @@ Pman.Dialog.CoreNotifyRecur = {
                                     if (operation != 'commit') {
                                         return;
                                     }
+                                    var p = Roo.apply({}, record.data);
+                                    p.dtstart = record.data.dtstart.format('Y-m-d');
+                                    p.dtend = record.data.dtend.format('Y-m-d');    
+                                    
+                                    
                                     new Pman.Request({
                                         url : baseURL + '/Roo/Core_notify_recur',
                                         method :'POST',
-                                        params : record.data,
+                                        params : p,
                                         success : function(data)
                                         {
-                                            Roo.log(data);
+                                            //Roo.log(data);
+                                            record.set('id', data.data.id);
                                         },
                                         failure : function() {
                                             Roo.MessageBox.alert("Error", "There was a problem saving");
@@ -205,7 +211,7 @@ Pman.Dialog.CoreNotifyRecur = {
                                             var r = grid.getDataSource().reader.newRow({
                                             // defaults..
                                                 person_id : _this.data.person_id,
-                                                dtstart : new Date(0),
+                                                dtstart : new Date(),
                                                 dtend : Date.parseDate('2050-01-01', 'Y-m-d'),
                                                 tz : 'Asia/Hong Kong',
                                                 onid : _this.data.onid,