Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

Dynamic format #236

Open
DucatiGuy opened this issue Sep 16, 2020 · 0 comments
Open

Dynamic format #236

DucatiGuy opened this issue Sep 16, 2020 · 0 comments

Comments

@DucatiGuy
Copy link

Versions

  • vue: 6.12.0
  • vue-datetime: 1.0.0-beta.14
  • luxon: 1.25.0

Description: Want to format date based on distance from current date

Is there an existing technique to dynamically format the date returned by the picker? e.g. one of the following
Today 12:34
Tues 12.34
Tues 1 Oct 12:34

I have a function (formatDate) which returns a suitable format and have tried:

    <Datetime v-model="enterDateTime" 
              type="datetime" 
              title="Time to commence work" 
              :format="formatDate(enterStartDateTime)" 
              @input="formatDate(enterStartDateTime)" >
    </Datetime>

The above initially displays the date correctly but the format doesn't change on return from the picker.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant