53
Views
2
Comments
[OutSystems Data Grid] Datagrid reactive input calendar config options
outsystems-data-grid
Reactive icon
Forge asset by OutSystems
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. 



2020-08-05 09-00-16
Gabriel Lundgren

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
2017-07-24 06-43-32
Erik Brzozowski

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.