Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

238
Visualizações
V-Calendar works only according to date, doesn't work according to given times. How to work with times?

I am using the v-calendar component. And I want to display a dot on the calendar according to my event date. I work with milliseconds on the backend side. So I give the event datetimes as milliseconds to the calendar.

Here are my codes;

import VCalendar from 'v-calendar/lib/components/calendar.umd';

<VCalendar
 :locale="locale"
 :attributes="attributes"
 :is-expanded="true"
 @dayclick="onDayClick"
 :model-config="modelConfig"
 @update:to-page="navigation"
 />

  data () {
    return {
      locale: {
        id: 'tr',
        masks: { weekdays: 'WWW' },
      },
      modelConfig: {
        type: 'number',
      },
      attributes: [
        {
          dot: 'red',
          dates: [
            {
              start: 1648364400000, // 2022-03-27 10:00:00 in my timezone(tr)
              end: 1648501200000, // 2022-03-29 00:00:00 in my timezone(tr)
            },
          ],
        },
      ],
    };   },

In this scenario, I expect the end date should be excluded and the dot should not be shown on 29 March because I give the time as 00:00:00. The dots only should be shown on 27 March and 28 March. But it doesn't work like this. What should I do for the calendar works with times?

enter image description here

Here is code sandbox example: https://codesandbox.io/s/runtime-breeze-ibf6im?file=/src/App.vue

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda