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

449
Visualizações
How to have date in mm/dd/yyyy format on typing in date picker textfield in nuxtjs?

I implemented a date picker in a nuxtjs with the vuetify app. It's working fine when selecting any date from the calendar. I need to enable the same functionality while typing also. If I am typing like 12122021, it should be formatted to 12/12/2021 on typing itself. Here is what I have tried so far.

https://stackblitz.com/edit/github-fms71e?file=pages/index.vue

I am getting an undefined error when I lose focus. How can I implement the functionality?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Check this codesandbox I made, I'm not using Nuxt but you can make yourself an idea to implement it on your project: https://codesandbox.io/s/stack-70724804-sryk8?file=/src/components/custom/CustomDatePicker.vue

This is a custom date picker component that I made for one of my projects. You can customize it to your needs but the component already come with multiple customization options that you can enable/modify through props.

The date picker can display dates in 3 formats. It use vue-the-mask library to control manual date inputs and some auxiliary functions to control date convertions that I import as a mixin.

  1. dd/MM/yyyy
  2. MM/dd/yyyy (Using "month-first" prop)
  3. yyyy/MM (using "month" prop)

Regardless of the format you choose to display to the end user, the custom date picker will always work internally with yyyy-MM-dd or yyyy-MM date format

about 4 years ago · Juan Pablo Isaza Relatório
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