jQWidgets Forums
jQuery UI Widgets › Forums › Editors › DateTimeInput › JqxDateTimeinput with Jqxgrid-Culture not getting applied
Tagged: datetimeinput era
This topic contains 5 replies, has 2 voices, and was last updated by Peter Stoev 10 years, 7 months ago.
-
Author
-
Hi,
Culture(say Thailand) is not getting applied when edit the jqxdatetimeinput in jqxgrid(When cell is having a date initialized).
Grid cell shows proper cultured date on grid-load.
When we click on the cell to edit it, then cell became editable and it showed date with out culture.
But the calender properly shows culture and if we select a date from the calender, cell show expected date(cultured).Please find specific column (code snap) used for development:-
text: 'Start Date', columntype: 'datetimeinput', datafield: 'StartDate', width: '9%', minwidth: 90, align: 'left', cellsalign: 'left', cellsformat: 'd', clearString: "Clear", showFooter: true,cellsrenderer: function (row, columnfield, value, defaulthtml, columnproperties){ return Globalize.format(value, 'd', "th-TH"); }, createeditor: function (row, column,<code></code> editor) { editor.jqxDateTimeInput({ firstDayOfWeek: _firstDayOfWeek, culture: "th-TH" }); } }
Could you please help us on this?
Hello chandan,
I’d suggest you to check out the Grid’s localization help topic and example. Localization of the Grid and its editors is done by the Grid.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi,
I have used Grid localization but still edited cell is showing date 31/10/2014 but it should be 31/10/2557(Thailand culture).
I used the jsfiddle to replicate issue(http://jsfiddle.net/q3BPu/13/).following code is used to set the year offset:-
`var allEra = {
eras: [{ “name”: “A.D.”, “start”: null, “offset”: -543 }]
}
localizationobj.eras = allEra;`Could you please check the problem?
Hi chandan,
We do not take into account in our calculations the “offset” setting of the “era”. If you need that, I would suggest you to implement the column’s cellsrenderer callback function.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi,
I have already applied cellsrender in ‘datetimeinput’ column as follows:-
`cellsrenderer: function (row, columnfield, value, defaulthtml, columnproperties) {
var formattedDate = Globalize.format(value, ‘d’, “TH-th”);
return ‘<div style=”text-align: center; margin-top: 5px;”>’ + formattedDate + ‘</div>’;
},
It showing date correctly while cell is not editable but when it became editable it shows date again with out year ‘offset'(-543).Please provide some suggestion on this problem
Hi chandan,
In the Grid column’s “initeditor” you can customize the editor’s value and representation as well.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.