diff --git a/playground/App.vue b/playground/App.vue index 7811519..4091c72 100644 --- a/playground/App.vue +++ b/playground/App.vue @@ -1,14 +1,13 @@ diff --git a/src/components/SingleWeekPicker.vue b/src/components/SingleWeekPicker.vue new file mode 100644 index 0000000..63eea6f --- /dev/null +++ b/src/components/SingleWeekPicker.vue @@ -0,0 +1,211 @@ + + + + + \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 6be0d3d..642d542 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1 +1,2 @@ -export { default as SingleDatePicker } from './components/SingleDatePicker.vue' \ No newline at end of file +export { default as SingleDatePicker } from './components/SingleDatePicker.vue' +export { default as SingleWeekPicker } from './components/SingleWeekPicker.vue' \ No newline at end of file diff --git a/src/utils/calculateWeekNum.ts b/src/utils/calculateWeekNum.ts index 35e5428..034708a 100644 --- a/src/utils/calculateWeekNum.ts +++ b/src/utils/calculateWeekNum.ts @@ -5,7 +5,6 @@ export default (date: Date): { weekYear: number, weekNum: number } => { tempDate.setDate(tempDate.getDate() + 4 - (tempDate.getDay() || 7)) const forthDay = new Date(tempDate.getFullYear(), 0, 4) - console.log(forthDay) forthDay.setDate(forthDay.getDate() + 4 - (forthDay.getDay() || 7)) const diffInDays = Math.floor((tempDate.getTime() - forthDay.getTime()) / (24 * 60 * 60 * 1000))