Issue with datetimepicker field

I have some issue with datetimepicker field, I’m using bootstrap datetimepicker,
The data from DB gives me for e.g : 2019-12-14 15:23:00
But the field is showing : 2014-12-20 15:23:00 (about 6 days difference)

I’ve looked at the code source and the field has 2014-12-14T15:23:00Z as value…

Value into value attribute
enter image description here

Value shown by datetimepicker field

enter image description here

                format: 'DD-MM-YYYY HH:mm',

                minDate: moment(),
                defaultDate: moment(),

                sideBySide: true,
                ignoreReadonly: true,
                // as Bootstrap 4 is not using Glyphicons anymore
                icons: {
                    time: 'fa fa-clock-o',
                    date: 'fa fa-calendar',
                    up: 'fa fa-chevron-up',
                    down: 'fa fa-chevron-down',
                    previous: 'fa fa-chevron-left',
                    next: 'fa fa-chevron-right',
                    today: 'fa fa-check',
                    clear: 'fa fa-trash',
                    close: 'fa fa-times'

Thanks in advance

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *