@ -1693,18 +1693,18 @@ See <<web.adoc#mvc-config-conversion, Conversion and Formatting>> in the Spring
@@ -1693,18 +1693,18 @@ See <<web.adoc#mvc-config-conversion, Conversion and Formatting>> in the Spring
@ -1721,6 +1721,11 @@ format (this example does not depend on the Joda-Time library):
@@ -1721,6 +1721,11 @@ format (this example does not depend on the Joda-Time library):
@ -1740,8 +1745,15 @@ format (this example does not depend on the Joda-Time library):
@@ -1740,8 +1745,15 @@ format (this example does not depend on the Joda-Time library):
fun conversionService(): FormattingConversionService {
// Use the DefaultFormattingConversionService but do not register defaults
@ -3724,6 +3723,41 @@ The following example shows how to register custom formatters and converters:
@@ -3724,6 +3723,41 @@ The following example shows how to register custom formatters and converters:
}
----
By default Spring WebFlux considers the request Locale when parsing and formatting date
values. This works for forms where dates are represented as Strings with "input" form
fields. For "date" and "time" form fields, however, browsers use a fixed format defined
in the HTML spec. For such cases date and time formatting can be customized as follows:
@ -5010,7 +5008,7 @@ following example shows:
@@ -5010,7 +5008,7 @@ following example shows:
}
----
The following example shows how to achieve the same configuration in XML:
To do the same in XML config, use the following:
[source,xml,indent=0,subs="verbatim,quotes"]
----
@ -5049,6 +5047,41 @@ The following example shows how to achieve the same configuration in XML:
@@ -5049,6 +5047,41 @@ The following example shows how to achieve the same configuration in XML:
</beans>
----
By default Spring MVC considers the request Locale when parsing and formatting date
values. This works for forms where dates are represented as Strings with "input" form
fields. For "date" and "time" form fields, however, browsers use a fixed format defined
in the HTML spec. For such cases date and time formatting can be customized as follows: