Posted 1 November 2022, 1:55 am EST
Hi,
Using the getResources and setResources methods, you may change the weekdays, month names, and “today” label.
Please see the following snippet of code:
var resInfo = GC.Spread.Common.CultureManager.getResources();
// Change WeekDay Names
resInfo.CellTypes.Calendar_ShortWeeks_1 = 'A';
resInfo.CellTypes.Calendar_ShortWeeks_2 = 'B';
resInfo.CellTypes.Calendar_ShortWeeks_3 = 'C';
resInfo.CellTypes.Calendar_ShortWeeks_4 = 'D';
resInfo.CellTypes.Calendar_ShortWeeks_5 = 'E';
resInfo.CellTypes.Calendar_ShortWeeks_6 = 'F';
resInfo.CellTypes.Calendar_ShortWeeks_7 = 'G';
// Change Month Names
resInfo.CellTypes.Calendar_Months_1 = 'Month1';
resInfo.CellTypes.Calendar_Months_2 = 'Month2';
resInfo.CellTypes.Calendar_Months_3 = 'Month3';
resInfo.CellTypes.Calendar_Months_4 = 'Month4';
resInfo.CellTypes.Calendar_Months_5 = 'Month5';
resInfo.CellTypes.Calendar_Months_6 = 'Month6';
resInfo.CellTypes.Calendar_Months_7 = 'Month7';
resInfo.CellTypes.Calendar_Months_8 = 'Month8';
resInfo.CellTypes.Calendar_Months_9 = 'Month9';
resInfo.CellTypes.Calendar_Months_10 = 'Month10';
resInfo.CellTypes.Calendar_Months_11 = 'Month11';
resInfo.CellTypes.Calendar_Months_12 = 'Month12';
// Change Today Text
resInfo.CellTypes.Calendar_Today = "Custom Today Text";
GC.Spread.Common.CultureManager.addCultureInfo("de-DE", null, resInfo);
Sample: https://jscodemine.grapecity.com/share/MWbNsALDL0mFpMNcN17mIQ/
API References:
getResources method: https://www.grapecity.com/spreadjs/api/classes/GC.Spread.Common.CultureManager#getresources
addCultureInfo method: https://www.grapecity.com/spreadjs/api/classes/GC.Spread.Common.CultureManager#addcultureinfo
Regards,
Ankit