Hi all,
I have a hierarchical grid with editing mode and there're some datepicker column. I want with them:
- In display mode: Display in format "d MMM": I did, it's ok
- In Editing mode (user click to date cell):
+ Input is like as read-only (user cannot type)
+ Display in format "d MMM" as above
+ Open DatePicker dialog
+ Dont need show dropdown area in right (due to DatePicker dialog should be opened when click to cell)
I work this with mvc helper and cannot do as required. Anyone can help me?
Thanks,
Ngan
Dear Ngan Le Thi,
Thanks for using Ignite UI controls.
You may set those preferences in Updating Hierarchical Grid Feature. In Updating add Column Settings for desired column as follow snippet:
...
features: [{... columnSettings: [{ columnKey: 'OrderDate', // Desired column key editorType: 'datepicker', editorOptions: { readOnly: true, dateFormat: 'd MMM', button: 'none', dropDownOnReadOnly: true, dropDownTriggers: 'focus' }
... }]
Please feel free to contact me if you have any additional questions regarding this matter.
Best Regards,
Stanimir Todorov
Hi Stanimir,
I am using MVC helper, can you give me instructions in mvc helper?
This is changed code
Hello Ngan ,
Thank you for the code.
The following code that you use on the editcellstarted event:
$(editor).igDatePicker({
readOnly: true,
dateDisplayFormat: 'd MMM',
button: 'none',
dropDownOnReadOnly: true,
dropDownTriggers: 'focus',
minValue: minDate,
maxValue: maxDate
});
With actually re-create the date picker.
It will basically re-instantiate it when you enter edit mode. The newly instantiated editor will not automatically set the selected value to the cell.
Due to this the editor will not work as expected.
You can instead change the related options of the editor directly. For example:
function setupCalendar(colKey, editor) {
//do somethings...
var minDate = new Date(2014, 3, 10);
var maxDate = new Date(2014, 5, 2);
$(editor).igEditor("option", "minValue", minDate);
$(editor).igEditor("option", "maxValue", maxDate);
}
I’m attaching the modified sample for your reference.
I’ve removed the dlls from the Bin folder due to their size.
Please refer to the attached sample and let me know if you encounter any issue with it or if you have any questions.
Maya Kirova
Developer Support Engineer II
Infragistics, Inc.
http://ko.infragistics.com/support
Hi Maya,
Thanks for your code. It's so good. But there's a issue. I test in Ipad mode, when click date column, the calendar show and disappear soon, cannot select a date.
Can you help me?
I’ve tested this on my side and encountered the same behavior with the read only date picker.
I have logged this behavior in our internal tracking system with a Development ID of 171337.
I’ve also opened a private case for you with number: CAS-135994-G5T9S4 so that you may track the progress of the development issue.
You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site.
Please let me know if you need more information.
I am also encountering this issue. Is there a work around? Can I also access the development tracking system for this issue?
Regards,
Arthur