Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date picker runs vertically down the screen #84

Open
mathijsfr opened this issue Oct 27, 2022 · 1 comment
Open

Date picker runs vertically down the screen #84

mathijsfr opened this issue Oct 27, 2022 · 1 comment

Comments

@mathijsfr
Copy link

I am working with nuxt3 and I added the date picker as plugin like so:

import LitepieDatepicker from 'litepie-datepicker-tw3';

export default defineNuxtPlugin((nuxtApp) => {
    nuxtApp.vueApp.use(LitepieDatepicker)
})

My datepicker.vue component looks like this:|

<template>
  <div>
    <litepie-datepicker
      i18n="nl"
      placeholder="Laatste 28 dagen"
      :disable-date="dDate"
      :formatter="formatter"
      separator=" t/m "
      :modelValue="props.modelValue"
      @update:modelValue="emit('update:modelValue', $event)"
    />
  </div>
</template>

<script setup>
import { ref } from 'vue';

const emit = defineEmits(['update:modelValue'])

const props = defineProps({
  modelValue: Object,
})

const formatter = ref({
  date: 'DD MMM YYYY',
  month: 'MMM'
});

const dDate = (date) => {
  return date > new Date();
}

However, after importing the component I get the following result on a local build (npm run dev):

image

And this when clicking (uses entire screen):

image

I have tailwind version 3.2.1 and I added path.resolve(__dirname, './node_modules/litepie-datepicker/**/*.js') to my tailwind.config.js content.

@mathijsfr
Copy link
Author

Upon closer inspection it looks like the media queries aren't running properly. Litepie datepicker for tailwind 2 still runs in production, which shows different css depending on screen size. Locally with litepie datepicker for tailwind 3 these media queries are not found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant