With the [type] attribute set to "date" <uwc-input> will render a date input.

Similar to <uwc-input type="number"> this will format its value according to the closest [lang] attribute.

You can also configure a custom format pattern by specifying a valid format string for the [pattern] attribute.

It is possible to customize the placeholder as long as the "separators" (the bits that don't represent a value part) match the current [pattern].

Because it is rather tedious to specify a placeholder everywhere just because your app requires a different placeholder than the standard you can also override the default placeholder.

Just keep in mind that this is not reactive, so you should do this once for your whole app.

// specified per locale
UwcInputElement.config.date.defaults["en-US"] = {
pattern: "yyyy/MM/dd", // a sensible default
placeholder: "YYYY/MM/DD",
}

--- TO BE DONE ---

Because the format string can also include time components it is possible to use this type for date and time inputs.

Since this type simply utilizes a popup which you can provide before initialization it is possible to provide your own datepicker for example.