-
30 Nov 2012 3:35 PM #1
tpl doesn't allow Date Format
tpl doesn't allow Date Format
Ext Designer throws an error when the tpl for a Date Column contains a formatted date. For example, if I have the following tpl for the Date Column.
I get this error:HTML Code:<span class="{[(new Date(values.TargetDate) < new Date() && values.StatusID == 1) ? "negative" : ""]}">{TargetDate:date(M d, Y)}</span>
Designer-DateParseBug.png
The Designer version I'm using is - 1.2.3 Build 52.
-
30 Nov 2012 3:38 PM #2
My Bad - Missed "" in date format
My Bad - Missed "" in date format
Missed double quotes in the date format. Here is the correct version which worked fine.
Sorry!HTML Code:<span class="{[(new Date(values.TargetDate) < new Date() && values.StatusID == 1) ? "negative" : ""]}">{TargetDate:date("M d, Y")}</span>
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote