You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off all I would like to thank you for this cool package and the work you invested. While working with this package I noticed a problem that is affecting the DateTime fields.
When doing a call on a ACF DateTime field that is empty, the method returns a Carbon Object containing the current date. I think it would be better if the method returns false when the value for the requested field is empty.
The reason that the datePicker() method returns the current date and not false is because the methods assigns a value to the date with the following code:
Hi,
First off all I would like to thank you for this cool package and the work you invested. While working with this package I noticed a problem that is affecting the DateTime fields.
When doing a call on a ACF DateTime field that is empty, the method returns a Carbon Object containing the current date. I think it would be better if the method returns false when the value for the requested field is empty.
The reason that the datePicker() method returns the current date and not false is because the methods assigns a value to the date with the following code:
$this->date = Carbon::createFromFormat($format, $dateString);
In the case the field is empty, $dateString will be empty and
$this->date
will have the current date.What do you think about this fix ? I will submit a PR and link in within this issue
Thank you,
The text was updated successfully, but these errors were encountered: