Skip to content

Commit

Permalink
Merge 2e20dc6 into de0fc75
Browse files Browse the repository at this point in the history
  • Loading branch information
gmoneh committed Mar 10, 2020
2 parents de0fc75 + 2e20dc6 commit d6305f9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions index.d.ts
@@ -0,0 +1,4 @@
import Vue, { Component } from 'vue'

export default class Datepicker extends Vue {
}
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -10,8 +10,10 @@
],
"main": "dist/vuejs-datepicker.js",
"module": "dist/vuejs-datepicker.esm.js",
"types": "index.d.ts",
"unpkg": "dist/vuejs-datepicker.min.js",
"files": [
"index.d.ts",
"src",
"dist"
],
Expand Down
3 changes: 2 additions & 1 deletion src/components/Datepicker.vue
Expand Up @@ -23,7 +23,7 @@
:bootstrapStyling="bootstrapStyling"
:use-utc="useUtc"
@showCalendar="showCalendar"
@closeCalendar="close"
@closeCalendar="close(true)"
@typedDate="setTypedDate"
@clearDate="clearDate">
<slot name="afterDateInput" slot="afterDateInput"></slot>
Expand Down Expand Up @@ -252,6 +252,7 @@ export default {
return this.close(true)
}
this.setInitialView()
this.$emit('opened')
},
/**
* Sets the initial picker page view: day, month or year
Expand Down
6 changes: 3 additions & 3 deletions test/unit/specs/Datepicker/Datepicker.spec.js
Expand Up @@ -245,12 +245,12 @@ describe('Datepicker.vue set by timestamp', () => {
wrapper = shallow(Datepicker, {
propsData: {
format: 'yyyy MM dd',
value: new Date(Date.UTC(2018, 0, 29)).getTime()
value: new Date(Date.UTC(2018, 1, 28)).getTime()
}
})
expect(wrapper.vm.selectedDate.getFullYear()).toEqual(2018)
expect(wrapper.vm.selectedDate.getMonth()).toEqual(0)
expect(wrapper.vm.selectedDate.getDate()).toEqual(29)
expect(wrapper.vm.selectedDate.getMonth()).toEqual(1)
expect(wrapper.vm.selectedDate.getUTCDate()).toEqual(28)
})
})

Expand Down

0 comments on commit d6305f9

Please sign in to comment.