Skip to content

Migrating to 0.2 ​

Core works in seconds ​

parseDuration returns seconds next to minutes. Several inputs changed from minutes to seconds:

  • min and max in ParseOptions
  • the input of formatDuration
  • the bounds of formatErrorMessage
ts
// 0.1
formatDuration(90)
// 0.2
formatDuration(90 * 60)

The component's v-model still holds minutes by default, see Value formats.

Locales are objects ​

  • locales takes locale objects: :locales="[en, de]" instead of ['en', 'de'].
  • locale replaces displayLocale.
  • customAliases is gone. Extend a locale with defineLocale instead.
  • LOCALE_ALIASES, ERROR_MESSAGES and UNIT_MINUTES are replaced by the locale objects and UNIT_SECONDS.

Errors wait for blur ​

Errors are no longer shown while typing by default (validateOn: 'eager'). Use validate-on="input" for the old behaviour.

Implicit units ​

1h 30 is now 90 minutes instead of a missing_unit error. Set :implicit-units="false" to keep the old behaviour.

Forms ​

name now goes to a hidden input carrying the model value, instead of the text input.

Renderless slot ​

The slot prop minutes is now value.

Released under the MIT License.