Skip to content
Snippets Groups Projects
Commit fcb0d3da authored by Jared Hancock's avatar Jared Hancock
Browse files

Fix date formatting on due date (again)

Fixes #834 (again)
parent 5c4556ef
No related branches found
No related tags found
No related merge requests found
...@@ -303,8 +303,11 @@ $(document).ready(function(){ ...@@ -303,8 +303,11 @@ $(document).ready(function(){
$(document).on('submit', 'form', function() { $(document).on('submit', 'form', function() {
$('.dp', $(this)).each(function(i, e) { $('.dp', $(this)).each(function(i, e) {
var $e = $(e), var $e = $(e),
d = $e.datepicker('getDate'); d = $e.datepicker('getDate'),
$e.val(d.toJSON().substring(0,10)); 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