-
Notifications
You must be signed in to change notification settings - Fork 133
0.9.0 Breaking Changes
Mathieu Lajoie edited this page Aug 1, 2019
·
7 revisions
Below is the list of all breaking changes paired to the 0.9.0 release. They are listed in no particular order and accompanied by a short explanation on why the change was necessary. Before and after examples are also provided for most of the changes.
-
Calendar now uses a custom
FdDate
model instead of the native JS date object in single mode.<fd-calendar [calType]="'single'" [(ngModel)]="date" [blockFunction]="myBlockFunction" [disableFunction]="myDisableFunction"> </fd-calendar>
/** Before */ myBlockFunction = function(d: Date): boolean; myDisableFunction = function(d: Date): boolean; date = { date: new Date() }; /** After */ myDisableFunction = function(d: FdDate): boolean myBlockFunction = function(d: FdDate): boolean date: FdDate = FdDate.getToday();
-
Calendar now uses
FdDateRange
model instead of the native JS date object in range mode.<fd-calendar [calType]="'range'" [(ngModel)]="dates"> </fd-calendar>
/** Before */ dates = { date: new Date(2019, 9, 11), rangeEnd: new Date(2019, 10, 11) }; /** After */ dates: FdRangeDate = { start: new FdDate(2019, 9, 11), end: new FdDate(2019, 9, 11) };
-
Datepicker now uses the
FdDate
model instead of the native JS date object in single mode.<fd-date-picker [calType]="'single'" [(ngModel)]="date" [blockFunction]="myBlockFunction" [disableFunction]="myDisableFunction"> </fd-date-picker>
/** Before */ myBlockFunction = function(d: Date): boolean; myDisableFunction = function(d: Date): boolean; date = { date: new Date() }; /** After */ myDisableFunction = function(d: FdDate): boolean; myBlockFunction = function(d: FdDate): boolean; date: FdDate = FdDate.getToday();
-
Datepicker now uses
FdDateRange
model instead of the native JS date object in range mode.<fd-date-picker [calType]="'range'" [(ngModel)]="dates"> </fd-date-picker>
/** Before */ dates = { date: new Date(2019, 9, 11), rangeEnd: new Date(2019, 10, 11) }; /** After */ dates: FdRangeDate = { start: new FdDate(2019, 10, 11), end: new FdDate(2019, 10, 19) };
-
Datetime picker now uses the
FdDateTime
model instead of the JS date object.<fd-datetime-picker [(ngModel)]="date" [blockFunction]="myBlockFunction" [disableFunction]="myDisableFunction"> </fd-date-picker>
/** Before */ myBlockFunction = function(d: Date): boolean; myDisableFunction = function(d: Date): boolean; date: Date = new Date(); /** After */ myDisableFunction = function(d: FdDate): boolean; myBlockFunction = function(d: FdDate): boolean; date: FdDatetime = FdDatetime.getToday();