Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

239
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda