-
Notifications
You must be signed in to change notification settings - Fork 133
0.9.0 Breaking Changes
jmarkowski edited this page Jul 29, 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.
-
Right now calendar component uses
FdDate
model instead of JS date object in single mode. Also all kind of block or disable functions right now takeFdDate
type argument instead ofDate
<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();
-
Right now calendar component uses
FdDateRange
model instead of 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)
};
-
Right now datepicker component uses
FdDate
model instead of JS date object in single mode. Also all kind of block or disable functions right now takeFdDate
type argument instead ofDate
<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();
-
Right now calendar component uses
FdDateRange
model instead of 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)
};
-
Right now datetimepicker component uses
FdDateTime
model instead of JS date object. Also all kind of block or disable functions right now takeFdDate
type argument instead ofDate
<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();