• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Display wrong value in <input type="date" in RTL

truonglv

Formerly Nobita.Kun
#1
As title. In direction LTR its display as expected. But in RTL it always display current time. :oops:

Example: my value: 02-19-2014 but its display 02-18-2014 in RTL :)
 

Attachments

Mike

XenForo developer
Staff member
#2
Can I see the template code you're using with this? There is potentially a bug in our code and I'm making some tweaks to handle it, though I want to confirm with your template code.

In the mean time, you should simply generate the date in PHP without using the XenForo_Locale functions.
 

truonglv

Formerly Nobita.Kun
#3
Can I see the template code you're using with this? There is potentially a bug in our code and I'm making some tweaks to handle it, though I want to confirm with your template code.

In the mean time, you should simply generate the date in PHP without using the XenForo_Locale functions.
Code:
<input type="date" name="date" value="{xen:if '{$note.trigger_date}', '{xen:date {$note.trigger_date}, picker}', '{xen:date {$serverTime}, picker}'}" class="textCtrl autoSize" id="ctrl_date" />
This is code I was used :).
In the mean time, you should simply generate the date in PHP without using the XenForo_Locale functions.
Yep! I can simply get it via XenForo_Locale ;)