Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Calling SetValue on Element/DateSelect with an empty string set's to todays date #8

Open
@carnage

Description

@carnage

If a DateSelect element has it's value set to an empty string, due to the behaviour of php's date time object; the element is set to today's date. See offending code:

if (is_string($value)) {

This may be considered desirable; however if the option create_empty_option is set to create a default empty option, this behaviour prevents the element from being set back to the empty option.

The fix would be to test for an empty string in that conditional, but is a potential BC break

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions