Skip to content

Commit 7f83559

Browse files
committed
these two requests require a specific format for now
1 parent 53ad1d2 commit 7f83559

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

js/src/timer.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,10 @@ function() {
125125
text: "Confirm",
126126
click: function() {
127127
var baseUrl = OC.generateUrl('/apps/timetracker/ajax/add-work-interval/'+encodeURIComponent(encodeURIComponent($('#name-manual-entry').val()))); // encode twice so we can have slashes
128-
129128
var jqxhr = $.post( baseUrl,
130129
{
131-
start:picker.data('daterangepicker').startDate.format(dtf.dtformat()),
132-
end:picker.data('daterangepicker').endDate.format(dtf.dtformat()),
130+
start:picker.data('daterangepicker').startDate.format('DD/MM/YY HH:mm'),
131+
end:picker.data('daterangepicker').endDate.format('DD/MM/YY HH:mm'),
133132
tzoffset: new Date().getTimezoneOffset(),
134133
async: true,
135134
details:$('#details-manual-entry').val()} ,function() {
@@ -330,7 +329,7 @@ function() {
330329

331330
$(this).on('apply.daterangepicker', function(ev, picker) {
332331
var id = $(this).data('myid');
333-
var jqxhr = $.post( "ajax/update-work-interval/"+id,{start:picker.startDate.format(dtf.dtformat()), end:picker.endDate.format(dtf.dtformat()), tzoffset: new Date().getTimezoneOffset()}, function() {
332+
var jqxhr = $.post( "ajax/update-work-interval/"+id,{start:picker.startDate.format('DD/MM/YY HH:mm'), end:picker.endDate.format('DD/MM/YY HH:mm'), tzoffset: new Date().getTimezoneOffset()}, function() {
334333
})
335334
.done(function(data, status, jqXHR) {
336335
var response = data;

0 commit comments

Comments
 (0)