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

v-calendar slot in range with nuxtjs dont work #1487

Open
TimotheDavid opened this issue Jul 19, 2024 · 1 comment
Open

v-calendar slot in range with nuxtjs dont work #1487

TimotheDavid opened this issue Jul 19, 2024 · 1 comment

Comments

@TimotheDavid
Copy link

TimotheDavid commented Jul 19, 2024

hello I have a small problem ... I cannot slot vcalendar with nuxtjs

I use vue 3.4.27 and v-calendar 3.1.2

this is my code and I don't understand really how to use BaseInput .... ( how can I import it .... thanks for all !

    <div class="w-full">
      <Label class="grid w-full max-w-sm items-center gap-1.5 my-2"><slot name="title"></slot></Label>
      <VDatePicker v-model="range" is-range>
        <template #default="{ inputValue, inputEvents }">
          <div class="flex items-center w-full justify-between">
            <Input
              :value="range.start"
              v-on="inputEvents.start"
              class="mr-2"
            />
            <ChevronRight class="w-20" />
            <Input
              class="ml-2"
              v-model="inputValue.end"
              v-on="inputEvents.end"
            />
          </div>
        </template>
      </VDatePicker>
    </div>
  </div>

my IDE ( webstom tell me : that i donest recognize default template ....

image

@yenpu
Copy link

yenpu commented Sep 18, 2024

Hi TimotheDavid,

I have struggle with the BaseInput as well and finally the code below works for me

<VDatePicker v-model="range" locale="zh-TW" is-range>
  <template #default="{ inputValue, inputEvents }">
    <input :value="inputValue.start" placeholder="YYYY/MM/DD" class="ui mini input" v-on="inputEvents.start">
    <span><img src="/tilde.png" alt="tilde" /></span>
    <input :value="inputValue.end" placeholder="YYYY/MM/DD" class="ui mini input" v-on="inputEvents.end">
  </template>
</VDatePicker>

I hope it helps.

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

2 participants