New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug? Date and Time fieldtypes setting non-null value #1292

Closed
chris-79 opened this Issue Mar 2, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@chris-79

chris-79 commented Mar 2, 2017

Expected behaviour

Null/unset values in an existing entry should not cause the date picker or time picker to become set when the entry's edit page is opened.

Actual behaviour

When the field value is null/not set, the date field defaults to today and the time field defaults to midnight, BUT ONLY if the entry already exists (aka when editing an existing entry).

Example entry data causing the issue:

end_date: ""
end_time: ""

– and –

end_date:
end_time:

Results

Observed

screenshot

Expected

screenshot

Steps to reproduce

  1. Create entry with date and/or time fieldtype data that is null
  2. Open the Edit page for the entry
  3. Observe that the fields now have values

Server configuration

Operating system:
MacOS 10.12.3

Web server:
2.4.25

PHP version:
7.0.15

Statamic version:
v2.5.3

Updated from an older Statamic or fresh install:
Updated

List of installed addons:

Logs

none

@jackmcdade

This comment has been minimized.

Member

jackmcdade commented Mar 17, 2017

Looking into it!

@jackmcdade

This comment has been minimized.

Member

jackmcdade commented Mar 17, 2017

Squashed for release in 2.5.6.

@jasonvarga jasonvarga closed this Mar 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment