No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    QDate disable past dates

    Help
    2
    5
    2005
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      DranrebTheGreat last edited by

      Hi, just want to know if I can disable past dates on QDate Options? TIA

      metalsadman 1 Reply Last reply Reply Quote 0
      • metalsadman
        metalsadman @DranrebTheGreat last edited by

        @DranrebTheGreat yep https://quasar.dev/vue-components/date#Limiting-options.

        optionsFn(d) {
          return d >= date.formatDate(Date.now(), 'YYYY/MM/DD')
        }
        
        D 1 Reply Last reply Reply Quote 2
        • D
          DranrebTheGreat @metalsadman last edited by DranrebTheGreat

          @metalsadman thank you so much for the quick response. But error appears on the console log stating that date.FormatDate is not a function. Just want to disable the days after the current date.

          metalsadman 1 Reply Last reply Reply Quote 0
          • metalsadman
            metalsadman @DranrebTheGreat last edited by metalsadman

            @DranrebTheGreat import it import { date } from 'quasar'. https://quasar.dev/quasar-utils/date-utils#Format-for-display

            D 1 Reply Last reply Reply Quote 1
            • D
              DranrebTheGreat @metalsadman last edited by

              @metalsadman works like a charm. thank you so much for the help ! 🙂

              1 Reply Last reply Reply Quote 0
              • First post
                Last post