We should either remove the cache property (from the base abstract helper) or stale/reset its value to null when calling either setDateType() or setTimeType() or setLocale().
This affects all AbstractFormDateSelect descendants, namely: FormMonthSelect, FormDateSelect and FormDateTimeSelect
This also affects calling render() after calling setDateType() or setTimeType() or setLocale(), as the internal pattern is cached during the 1st rendering call with the values of $dateType, $timeType, $locale at that time.
As explained in the issue title we can call for invoke
FormDateTimeSelect.
with a few arguments:but in doing that
getPattern()
is called internally which result is cached to the internal propertypattern
with the values for dateType, timeType and locale of its first call. https://github.com/laminas/laminas-form/blob/d20ba468fad89a23e68ed679b6b827543e166afa/src/View/Helper/FormDateTimeSelect.php#L180We should either remove the cache property (from the base abstract helper) or stale/reset its value to
null
when calling eithersetDateType()
orsetTimeType()
orsetLocale()
.This affects all
AbstractFormDateSelect
descendants, namely:FormMonthSelect
,FormDateSelect
andFormDateTimeSelect
This also affects calling
render()
after callingsetDateType()
orsetTimeType()
orsetLocale()
, as the internal pattern is cached during the 1st rendering call with the values of$dateType
,$timeType
,$locale
at that time.