Retarian
May 19, 2021, 9:08 AM
Hello friends,
We have another problem again. We are trying to make a grid which has a column with datepicker.
What we need to implement is that column MonthDate to be a datefield which means it will have a datepicker, but we need that datepicker to be actually a MonthPicker like examples from js: https://docs.sencha.com/extjs/6.0.2/classic/Ext.picker.Month.html
For example:
In the current version of code anyhow we have tried to make that column formatting as "yyyyMM", we still cannot make it work on the editrow as:
example: 202105; and the only format which works is: 19/05/2021.
The thing is that as <ext-dateField> is working, see code below:
<ext-dateField fieldLabel="<b>Month</b>" name="NewMonth"
labelAlign="Left"
allowBlank="false"
Format="yyyyMM"
id="Month"
value='DateTime.Today.AddMonths(-1).ToString("yyyyMM")'
maxDate="<%# DateTime.Today %>" />
But as a <ext-dateColumn> or <ext-column> into <ext-gridPanel> is not working and we didnt find a solution to this.
Can you please help us on this problem?
Here is Code for the Grid:
<ext-gridPanel title="Month Grid" id="monthgrid" header="false" frame="true" scrollable="true" minHeight="350">
<store>
<ext-store id="gridstore" data="Model.gridsmodel" autoLoad="true">
<fields>
<ext-dateDataField name="MonthDate" />
<ext-stringDataField name="Comment" />
</fields>
</ext-store>
</store>
<plugins>
<ext-cellEditingPlugin clicksToEdit="1" editing="true" id="edit">
<listeners>
<edit fn="edit" />
</listeners>
</ext-cellEditingPlugin>
</plugins>
<columns>
<ext-dateColumn text="MonthDate" dataIndex="MonthDate" id="MonthDate" editor="datefield" Format="yyyyMM" value='DateTime.Today.ToString("yyyyMM")' maxDate="<%# DateTime.Today %>" />
<ext-column text="Comment" id="Comment" dataIndex="Comment" flex="1" editor="textarea" />
</columns>
</ext-gridPanel>
And here is a screenshot with example for the Month column where the first row is editable and how he needs the data, and the rest of them is an example of how we need the data. (the data is added thru sql for example)
25529
We have another problem again. We are trying to make a grid which has a column with datepicker.
What we need to implement is that column MonthDate to be a datefield which means it will have a datepicker, but we need that datepicker to be actually a MonthPicker like examples from js: https://docs.sencha.com/extjs/6.0.2/classic/Ext.picker.Month.html
For example:
In the current version of code anyhow we have tried to make that column formatting as "yyyyMM", we still cannot make it work on the editrow as:
example: 202105; and the only format which works is: 19/05/2021.
The thing is that as <ext-dateField> is working, see code below:
<ext-dateField fieldLabel="<b>Month</b>" name="NewMonth"
labelAlign="Left"
allowBlank="false"
Format="yyyyMM"
id="Month"
value='DateTime.Today.AddMonths(-1).ToString("yyyyMM")'
maxDate="<%# DateTime.Today %>" />
But as a <ext-dateColumn> or <ext-column> into <ext-gridPanel> is not working and we didnt find a solution to this.
Can you please help us on this problem?
Here is Code for the Grid:
<ext-gridPanel title="Month Grid" id="monthgrid" header="false" frame="true" scrollable="true" minHeight="350">
<store>
<ext-store id="gridstore" data="Model.gridsmodel" autoLoad="true">
<fields>
<ext-dateDataField name="MonthDate" />
<ext-stringDataField name="Comment" />
</fields>
</ext-store>
</store>
<plugins>
<ext-cellEditingPlugin clicksToEdit="1" editing="true" id="edit">
<listeners>
<edit fn="edit" />
</listeners>
</ext-cellEditingPlugin>
</plugins>
<columns>
<ext-dateColumn text="MonthDate" dataIndex="MonthDate" id="MonthDate" editor="datefield" Format="yyyyMM" value='DateTime.Today.ToString("yyyyMM")' maxDate="<%# DateTime.Today %>" />
<ext-column text="Comment" id="Comment" dataIndex="Comment" flex="1" editor="textarea" />
</columns>
</ext-gridPanel>
And here is a screenshot with example for the Month column where the first row is editable and how he needs the data, and the rest of them is an example of how we need the data. (the data is added thru sql for example)
25529