diff --git a/src/Datetime.vue b/src/Datetime.vue
index de44e44..5e0956a 100644
--- a/src/Datetime.vue
+++ b/src/Datetime.vue
@@ -54,7 +54,8 @@ export default {
default: 'local'
},
format: {
- type: Object
+ type: Object,
+ default: null
},
type: {
type: String,
diff --git a/test/specs/Datetime.spec.js b/test/specs/Datetime.spec.js
index 70a9352..224c43f 100644
--- a/test/specs/Datetime.spec.js
+++ b/test/specs/Datetime.spec.js
@@ -297,17 +297,20 @@ describe('Datetime.vue', function () {
it('should be a date in the local time zone by default', function () {
const vm = createVM(this,
- ``,
+ ``,
{
components: { Datetime },
data () {
return {
- datetime: '2017-12-07T19:34:54.078+03:00'
+ datetime: '2017-12-07T19:34:54.078+03:00',
+ format: LuxonDateTime.DATETIME_MED
}
}
})
- expect(vm.$('.vdatetime-input').value).to.be.equal('Dec 7, 2017, 5:34 PM')
+ const localDateString = LuxonDateTime.fromISO('2017-12-07T19:34:54.078+03:00').toLocal().toLocaleString(LuxonDateTime.DATETIME_MED)
+
+ expect(vm.$('.vdatetime-input').value).to.be.equal(localDateString)
})
it('should be a date in the specified time zone', function () {