Skip to content

Commit ee97415

Browse files
committed
Set both selected and datetime variables to undefined on clear.
1 parent 60b4f87 commit ee97415

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/datetime-input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ directive('datetimeInput', ['$document', function ($document) {
3636
scope.setDate = function (date, calendar_update) {
3737
if ( scope.selected.isSame(date) ) { return; }
3838
if ( !date ) {
39-
scope.selected = undefined;
39+
scope.selected = scope.datetime = undefined;
4040
} else {
4141
scope.selected.year(date.year()).month(date.month()).date(date.date()).hours(date.hours()).minutes(date.minutes()).seconds(date.seconds());
4242
if ( (scope.selected.clone().startOf('week').month() !== scope.calendar.month() && scope.selected.clone().endOf('week').month() !== scope.calendar.month()) || calendar_update ) {

0 commit comments

Comments
 (0)