When using the #attribute_to_html method, passing in the render_as: :date argument seem to sometimes cause invalid dates. When the string is 11/08/2023, it gets parsed as August 8th, 2023. This is a problem when you have a date like 11/13/2023, because there is no 13th month.
Story
When using the
#attribute_to_html
method, passing in therender_as: :date
argument seem to sometimes cause invalid dates. When the string is 11/08/2023, it gets parsed as August 8th, 2023. This is a problem when you have a date like 11/13/2023, because there is no 13th month.Ref:
Screenshots / Video
Before:
After: