Releases: parttio/textfieldformatter
23.3.0
5.4.0
5.3.0
5.2.0
5.2.0.pre
Fixes the user input formatting broken since Vaadin 14.2.2 (Vaadin TextField 2.1.2)
5.1.0
Added delimiterLazyShow
You can set the delimiter to be shown only after the user starts typing the first character in the next character group. By default, the delimiter is shown immediately when the last character in the current group is typed.
new CustomStringBlockFormatter.Builder()
.blocks(1,2)
.delimiters("-")
.delimiterLazyShow()
.build();
5.0.1
5.0.0
ℹ️ Copying to clipboard now preserves formatting
This is a behavior change from earlier versions. If you still want the copy-to-clipboard to have the unformatted raw value, please open an issue and I can add the configuration option.
Numeral formatter supports having a postfix/suffix
Here the API from Cleave.js leaks more than usual. You add a prefix and define it as a 'tailprefix'.
/**
* Sets the prefix with possibility to add it to tail as postix/suffix with
* addAsPostfix true.
*
* @param value the prefix
* @param addAsPostfix true if the prefix should be shown as postfix/suffix
* (after the numeral).
*/
new NumeralFieldFormatter.Builder().prefix("€", true);
4.2.0 for Vaadin 14
DateFieldFormatter
Formats dates according to the given pattern, delimiter, maximum and minimum value.
TextField myDateField = new TextField();
new DateFieldFormatter.Builder()
.datePattern("yyyyMMdd")
.delimiter("-")
.dateMin(LocalDate.of(1900, 01, 01))
.dateMax(LocalDate.of(2019, 9, 3))
.build().extend(myDateField);
// or
TextField myDateField = new TextField();
new DateFieldFormatter(
"yyyyMMdd",
LocalDate.of(1900, 01, 01),
LocalDate.of(2019, 9, 3),
"-"
).extend(myDateField);
4.1.4
Remove flow-build-info.json from the release artifact