Migrating to 0.2
Core works in seconds
parseDuration returns seconds next to minutes. Several inputs changed from minutes to seconds:
minandmaxinParseOptions- 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
localestakes locale objects::locales="[en, de]"instead of['en', 'de'].localereplacesdisplayLocale.customAliasesis gone. Extend a locale withdefineLocaleinstead.LOCALE_ALIASES,ERROR_MESSAGESandUNIT_MINUTESare replaced by the locale objects andUNIT_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.