RSS Feed/News How to deal with xf dateinput form and its saving process

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
23,644
Points
823

Reputation:

I am trying to show date 1 year from now and save it in unix timestamp, but no success.
The form below shows me "Jul 28, 2024", but when I pickup any date it shows in different format e.g. 2024-07-28.

How to show and pickup on the same format?

Code:

<xf:dateinput name="expiration" id="expiration" value="{{ date($xf.time + 31536000) }}" required="true" />

And during the saving process, it shows "now plus 20 hours", non sense.

How to correctly save it in unix timestamp format?

Code:

$input...

Read more

Continue reading...
 
Status
Not open for further replies.
Top