diff --git a/src/fields/fieldDateTime.vue b/src/fields/fieldDateTime.vue index e73a2e06..7789c04b 100644 --- a/src/fields/fieldDateTime.vue +++ b/src/fields/fieldDateTime.vue @@ -48,8 +48,10 @@ ready() { if ($.fn.datetimepicker) { - $(this.$el).datetimepicker(this.schema.dateTimePickerOptions); - //$(this.$el).data("DateTimePicker").date(this.formatValueToField(this.value)); + let self = this; + $(this.$el).datetimepicker(defaults(this.schema.dateTimePickerOptions || {}, { + format: inputFormat + })); } else console.warn("Bootstrap datetimepicker library is missing. Please download from https://eonasdan.github.io/bootstrap-datetimepicker/ and load the script and CSS in the HTML head section!");