mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
BPUR: Add datetimepicker to Available On
This commit is contained in:
@@ -119,6 +119,26 @@ productsApp.directive('ngToggleColumnList', function($compile){
|
||||
}
|
||||
});
|
||||
|
||||
productsApp.directive('datetimepicker', function ($parse) {
|
||||
return function (scope, element, attrs) {
|
||||
// using $parse instead of scope[attrs.datetimepicker] for cases
|
||||
// where attrs.datetimepicker is 'foo.bar.lol'
|
||||
$(function(){
|
||||
element.datetimepicker({
|
||||
dateFormat: 'yy-mm-dd',
|
||||
timeFormat: 'HH:mm:ss',
|
||||
stepMinute: 15,
|
||||
onSelect:function (dateText, inst) {
|
||||
scope.$apply(function(scope){
|
||||
parsed = $parse(attrs.datetimepicker);
|
||||
parsed.assign(scope, dateText);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
productsApp.controller('AdminBulkProductsCtrl', function($scope, $timeout, $http, dataFetcher) {
|
||||
$scope.updateStatusMessage = {
|
||||
text: "",
|
||||
|
||||
Reference in New Issue
Block a user