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

241
Visualizações
How can I enable only certain dates when using q-date?

i am using q-date component in my quasar project. My purpose of use is to have the user select only the days that are enabled and I want to show the other days as disabled. I wrote it with pug by the way

             q-input.q-ma-md(readonly clearable v-model="options.date" dense outlined)
              template(v-slot:prepend)
                q-icon.cursor-pointer(name="event")
                  q-popup-proxy(transition-show="scale" transition-hide="scale")
                    q-date(v-model="options.date" :options="dataActiveOrNot" mask="YYYY-MM-DD")

  data() {
return {
  options: [
    {
      id: 1,
      title: 'Event 1',
      time: '10:00',
      details: 'This is a test event',
      date: '2022-06-03',
      type: 'active'
    },
    {
      id: 2,
      title: 'Event 2',
      time: '11:00',
      details: 'This is a test event',
      date: '2019-10-01',
      type: 'closed'
    },
    {
      id: 3,
      title: 'Event 3',
      time: '12:00',
      details: 'This is a test event',
      date: '2019-10-01',
      type: 'active'
    },
    {
      id: 4,
      title: 'Event 4',
      time: '13:00',
      details: 'This is a test event',
      date: '2019-10-01',
      type: 'active'
    },
    {
      id: 10,
      title: 'Event 10',
      time: '19:00',
      details: 'This is a test event',
      date: '2019-10-01',
      type: 'active'
    }
  ],
}

  methods: {
    dataActiveOrNot() {
      for (let i = 0; i < options.length; i++) {
        console.log(options[i].date)
        if (options[i].type == 'active') {
          return options[i].date
        }
      }
    },

I can't find where I am doing wrong, can you help? your answers will be rewarded

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