Skip to content

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

@saikirankalyanapu

Description

@saikirankalyanapu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions