mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-14 23:47:48 +00:00
Merge pull request #7211 from jibees/4207-add-query-params-in-url
Orders list : save filters params
This commit is contained in:
@@ -2,10 +2,13 @@ angular.module("admin.utils").directive "datepicker", ($window, $timeout) ->
|
||||
require: "ngModel"
|
||||
link: (scope, element, attrs, ngModel) ->
|
||||
$timeout ->
|
||||
flatpickr(element, Object.assign(
|
||||
flapickrInstance = flatpickr(element, Object.assign(
|
||||
{},
|
||||
$window.FLATPICKR_DATE_DEFAULT, {
|
||||
onOpen: (selectedDates, dateStr, instance) ->
|
||||
instance.setDate(ngModel.$modelValue)
|
||||
}
|
||||
));
|
||||
ngModel.$render = () ->
|
||||
newValue = ngModel.$viewValue;
|
||||
flapickrInstance?.setDate(newValue)
|
||||
|
||||
Reference in New Issue
Block a user