[buddypress-trac] [BuddyPress Trac] #8743: xprofile_set_field_data it's not working on "Date selector"
buddypress-trac
noreply at wordpress.org
Fri Sep 30 20:34:08 UTC 2022
#8743: xprofile_set_field_data it's not working on "Date selector"
--------------------------+-------------------------
Reporter: marioshtika | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Core | Version:
Severity: normal | Resolution: worksforme
Keywords: |
--------------------------+-------------------------
Changes (by imath):
* status: new => closed
* resolution: => worksforme
* milestone: Awaiting Review =>
Comment:
Hi,
That's because the pattern we use to validate a date is expecting the time
to be `00:00:00`, see line 31 of this file
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-
xprofile/classes/class-bp-xprofile-field-type-datebox.php#L31
If you use `xprofile_set_field_data(5, 21, '2017-12-03 00:00:00');` it
should work as expected.
Thanks for posting this ticket, we're never too sure whether something
weird is a bug or not 😅 As we don't handle time into this field type, I
believe it's not a bug.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8743#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list