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

truonglv

Well-known member
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

  • error.webp
    error.webp
    19.8 KB · Views: 26
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.
 
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 ;)
 
Top Bottom