Skip to content
Snippets Groups Projects
Commit 7a107737 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #1320 from greezybacon/issue/client-portal-date-fields


forms: Support non-US locale on client portal

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 30e43f7f 01d2af61
No related branches found
No related tags found
No related merge requests found
......@@ -214,3 +214,16 @@ showImagesInline = function(urls, thread_id) {
}
});
}
$(document).on('submit', 'form', function() {
// Reformat dates
$('.dp', $(this)).each(function(i, e) {
var $e = $(e),
d = $e.datepicker('getDate');
if (!d) return;
var day = ('0'+d.getDate()).substr(-2),
month = ('0'+(d.getMonth()+1)).substr(-2),
year = d.getFullYear();
$e.val(year+'-'+month+'-'+day);
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment