Open Fruchuxs opened 9 years ago
may be format:'Y-m-d' ? or better variant will be
$('input[type="date"]').each(function(i, obj) {
$(obj).attr('type', 'text');
$(obj).datetimepicker({
timepicker:false,
format:'d.m.Y'
});
});
Similar story but with the datetimepicker.
<input class="form-control" id="date" name="date" type="text" value="2018-May-18 03:10">
My form does not pass validation with error Not a valid datetime value.
Console warning:
The specified value "2018-May-18 03:10" does not conform to the required format. The format is "yyyy-MM-ddThh:mm" followed by optional ":ss" or ":ss.SSS".
My JS code:
$('input[type=datetime-local]') .attr('type', 'text') .datetimepicker({ inline:false, step: 5, format: 'Y-M-d H:i', });
If I make format 'Y-M-dTH:i' (with T between date and time) I am getting timezone inserted. Please help
@IamMashed I fixed this problem by trying
$.datetimepicker.setDateFormatter('moment'); // Setup the date formatter
$('input[type=datetime-local]').datetimepicker({
format: 'YYYY-MM-DDTHH:mm'
})
Hello everyone,
first of all: nice work! It's a great datetimepicker. But i have one big problem: It seems, that the datetimepicker doesn't support HTML 5 date Inputs.
If i click on a date in the picker, jquery prints the following line in my js console:
I think the problem is, that the value has the format "yyyy-MM-dd", but it's displayed in my local format (d.m.Y) through my browser.
Here is my JS Code:
Any ideas to fix this?
Greetings, Fruchuxs