ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

editable column: shows date, when edit shows datepicker.

Open kalelgwapo opened this issue 12 years ago • 2 comments

Is there anyway to achieve this? i tried different celltemplates but to no avail.

kalelgwapo avatar Feb 17 '14 08:02 kalelgwapo

why not use a directive for that within the template

2014-02-17 10:55 GMT+02:00 kalelgwapo [email protected]:

Is there anyway to achieve this? i tried different celltemplates but to no avail.

Reply to this email directly or view it on GitHubhttps://github.com/angular-ui/ng-grid/issues/994 .

novice3030 avatar Feb 17 '14 17:02 novice3030

@kalelgwapo This will get you part of the way there: http://plnkr.co/edit/B7gn0b3edGczdV9HWgze?p=preview . ngGrid's ngInput directive causes the cell template to switch on click-outside, which closes the datepicker and prevents the ng-model change. Using only ng-model doesn't switch the template out on date change.

I would maybe write your own directive based on ngInput to handle your mouse/keyboard events. It's not super complicated: https://github.com/angular-ui/ng-grid/blob/v2.0.7/src/directives/ng-input.js

c0bra avatar Feb 17 '14 22:02 c0bra