mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-12 03:50:22 +00:00
Copy datepicker directive to utils module
Ensures that datepicker is available for subscriptions
This commit is contained in:
committed by
Maikel Linke
parent
386716088a
commit
c77a01815c
@@ -0,0 +1,9 @@
|
||||
angular.module("admin.utils").directive "datepicker", ->
|
||||
require: "ngModel"
|
||||
link: (scope, element, attrs, ngModel) ->
|
||||
element.datepicker
|
||||
dateFormat: "yy-mm-dd"
|
||||
onSelect: (dateText, inst) ->
|
||||
scope.$apply (scope) ->
|
||||
# Fires ngModel.$parsers
|
||||
ngModel.$setViewValue dateText
|
||||
Reference in New Issue
Block a user