Skip to content

Commit

Permalink
fix(showcase): use differenceInCalendarDays to do judgement with days…
Browse files Browse the repository at this point in the history
… for date-picker's demo (#1648)
  • Loading branch information
wilsoncook authored and vthinkxie committed Jun 13, 2018
1 parent d11ee61 commit 7d593e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/date-picker/demo/disabled-date.ts
@@ -1,5 +1,5 @@
import { Component } from '@angular/core';
import * as differenceInDays from 'date-fns/difference_in_days';
import * as differenceInCalendarDays from 'date-fns/difference_in_calendar_days';
import * as setHours from 'date-fns/set_hours';

@Component({
Expand Down Expand Up @@ -42,7 +42,7 @@ export class NzDemoDatePickerDisabledDateComponent {

disabledDate = (current: Date): boolean => {
// Can not select days before today and today
return differenceInDays(current, this.today) > 0;
return differenceInCalendarDays(current, this.today) > 0;
};

disabledDateTime = (): object => {
Expand Down

0 comments on commit 7d593e6

Please sign in to comment.