attic-datepicker
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "attic-datepicker", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Beautiful single and range date picker that is built with Tailwind CSS and Vue 3 using day.js", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
import { computed, inject, reactive, toRefs, watch, ref, nextTick, unref } from 'vue' | ||
import { usePreviousDate, useCurrentDate, useNextDate } from "./fn" | ||
import { usePreviousDate, useCurrentDate } from "./fn" | ||
import dayjs from "dayjs"; | ||
export const useCalendar = () => { | ||
const datepicker = ref({ | ||
now: dayjs(), | ||
next: dayjs().add(1, 'month'), | ||
year: { | ||
previous: dayjs().year(), | ||
next: dayjs().year() | ||
}, | ||
// weeks: dayjs.weekdaysShort(), | ||
// months: dayjs.months() | ||
}) | ||
// const weeks = computed(() => datepicker.value.weeks); | ||
// const months = computed(() => datepicker.value.months); | ||
const calendar = computed(() => { | ||
const { now, next, year } = unref(datepicker); | ||
return { | ||
@@ -25,0 +7,0 @@ monthView: { |
@@ -18,19 +18,2 @@ export const usePreviousDate = (date: any) => { | ||
); | ||
}; | ||
export const useNextDate = (date: any) => { | ||
const display = []; | ||
for ( | ||
let i = 1; | ||
i <= 42 - (usePreviousDate(date).length + date.daysInMonth()); | ||
i++ | ||
) { | ||
display.push( | ||
date | ||
.date(i) | ||
.month(date.month()) | ||
.add(1, 'month') | ||
); | ||
} | ||
return display; | ||
}; | ||
} |
@@ -6,29 +6,33 @@ const path = require('path'); | ||
module.exports = { | ||
mode: 'jit', | ||
purge: [ | ||
// './docs/public/index.html', | ||
// './docs/src/*.{vue,js,ts,jsx,tsx}', | ||
path.resolve(__dirname, './node_modules/attic-datepicker/**/*.js') | ||
], | ||
darkMode: 'class', // or 'media' or 'class' | ||
theme: { | ||
extend: { | ||
colors: { | ||
}, | ||
fontFamily: { | ||
sans: ['Inter', ...fontFamily.sans] | ||
}, | ||
opacity: { | ||
85: '0.85' | ||
} | ||
} | ||
}, | ||
variants: { | ||
extend: { | ||
cursor: ['disabled'], | ||
textOpacity: ['disabled'], | ||
textColor: ['disabled'] | ||
} | ||
}, | ||
plugins: [] | ||
mode: 'jit', | ||
purge: [ | ||
// './docs/public/index.html', | ||
// './docs/src/*.{vue,js,ts,jsx,tsx}', | ||
path.resolve(__dirname, './node_modules/attic-datepicker/**/*.js') | ||
], | ||
darkMode: 'class', // or 'media' or 'class' | ||
theme: { | ||
extend: { | ||
colors: { | ||
}, | ||
fontFamily: { | ||
sans: ['Inter', ...fontFamily.sans] | ||
}, | ||
transitionProperty: { | ||
width: 'width', | ||
height: 'height', | ||
}, | ||
opacity: { | ||
85: '0.85' | ||
} | ||
} | ||
}, | ||
variants: { | ||
extend: { | ||
cursor: ['disabled'], | ||
textOpacity: ['disabled'], | ||
textColor: ['disabled'] | ||
} | ||
}, | ||
plugins: [] | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6554
67