[OutSystems Data Grid] Datagrid reactive input calendar config options
data-grid-reactive
Reactive icon
Forge component by Platform Maintenance
Application Type
Reactive

Hello,

Is it possible to change the input Calendar that is shown in the data grid. 


I would like to to able to change the first day of the week to monday instead of sunday, and add a weeknumber as first column. 



Hey @Erik Brzozowski!


As of now we don't have a way of achieving this with low-code. So for it to work, we must use some JavaScript. Our grid uses a library behind it called Wijmo. This library allows us to change the first day of the week, but it doesn't seem to allow us adding a weeknumber as a first column.


So to change the first day of the week, you must create a JS node on your Grid On Initialize event and add the following snippet:


var grid = GridAPI.GridManager.GetGridById($parameters.GridId);

var column = grid.getColumn($parameters.ColumnId);


if (column) {

    column.provider.editor.calendar.firstDayOfWeek = 1; // 0-6 (Sunday - Saturday)

}



I've also added a sample containing a working example, please let me know if this helps you.


Thank you,

Gabriel Lundgren

DateCalendar.oml

Hello Gabriel, 

thanks for you solution for the first day of the week. It works perfect. To bad that Wijmo  does not support a weeknumber. 

Erik

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.