ionic-datepicker icon indicating copy to clipboard operation
ionic-datepicker copied to clipboard

How to clean "$scope.date" after a specific event happens??

Open saikirankalyanapu opened this issue 9 years ago • 0 comments

Hi Celsomarques,

Thank you for excellent directive.I have a use case to clean the selected date after a click event on a button for instance on submit.

I tried by creating a method in "DatepickerCtrl" as follows as : scope.clean{ $scope.date="";// which holds the selected date value. };

Then,in directive $('.datepicker-clean').on('click', scope.crossMark); scope.crossMark= function() { controller.clean(); scope.modal.remove(); };

When, I tried above code everything was expected i.e i'm able to clean selected date scope value on views but , date modal was triggering multiple times.

Is there any other better way to clean scope variable on views after submission of the form.

Thanks, Sai.

saikirankalyanapu avatar Jun 19 '16 07:06 saikirankalyanapu