Description

The Header Search directive

Usage

as element:
<widget:datetimepicker
       ng-model="{Object}"
       [on-set-time="{Object}"]
       [datepicker-config="{Object}"]
       date-from="{String}">
</widget:datetimepicker>

Parameters

ParamTypeDetails
ngModelObjectScope variable to update
onSetTime (optional)ObjectFunction to call when the date/time has been selected
datepickerConfig (optional)ObjectConfig for datepicker. {minView: ‘year/month/day/hour’}
dateFromStringEarliest pickable date, updates automatically when changed.

Example

Source

<input type="text" ng-model="data | date:'fullDate'" />
<widget:datetimepicker data-ng-model="data" data-on-set-time="onTimeSet(newDate, oldDate)"></widget:datetimepicker>
angular.module('lightning')
.controller('ExampleController', ['$scope', function($scope) {
            $scope.data = new Date();

            $scope.onTimeSet = function (newDate, oldDate) {
                console.log(newDate, oldDate);
            }
        }]);

Result

Result