New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: calendar datepicker typedocs #867
docs: calendar datepicker typedocs #867
Conversation
Deploy preview for fundamental-ngx ready! Built with commit 32f6178 |
@@ -46,6 +46,9 @@ export interface EmittedDate { | |||
|
|||
let calendarUniqueId: number = 0; | |||
|
|||
/** | |||
* Calendar component, typically used by the DatePicker and DateTimePicker components. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit more description, also mention that it supports Angular forms by itself
@Output() | ||
isInvalidDateInput: EventEmitter<any> = new EventEmitter(); | ||
|
||
/** @hidden Used when this calendar is for a date time picker component. For internal use. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh all these hidden inputs really grinds my gears, but eh for now unavoidable
@Input() | ||
isDateTimePicker: boolean = false; | ||
|
||
/** @hidden Whether the date is invalid. Internal use */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing period at the end here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually missing period everywhere where there is 'Internal use'
selectCounter: number = 0; | ||
|
||
/** The currently selected CalendarDay model */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing periods in this section too
@Input() | ||
selectedDay: CalendarDay = { | ||
date: null | ||
}; | ||
/** Fired when the selectedDay model changes */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is very vague and could be applied to most events - the description should also involve the context in which this model changes, which in this case is when a new day is selected
@Input() | ||
disableRangeStartFunction = function(d): boolean { | ||
return false; | ||
}; | ||
/** @param d Function used to disable certain dates in the calendar for the range end selection. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too, you get the gist i guess
loadPrevYearsList() { | ||
this.calendarYearsList = []; | ||
this.firstYearCalendarList -= 12; | ||
this.constructCalendarYearsList(); | ||
} | ||
|
||
// Functions that handle selection (day, month, year) | ||
/** @hidden */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be exposed, people could use it to programatically select a date, no?
@@ -658,6 +727,7 @@ export class CalendarComponent implements OnInit, OnDestroy, AfterViewChecked, C | |||
} | |||
} | |||
|
|||
/** @hidden */ | |||
openYearSelection() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe these could also be exposed, what do you think?
@Input() | ||
selectedDay: CalendarDay = { | ||
date: null | ||
}; | ||
|
||
/** Fired when the selectedDay model changes */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more precise description, missing period (like in calendar, so i won't retag all these)
@@ -90,50 +105,62 @@ export class DatePickerComponent implements OnInit, OnDestroy, ControlValueAcces | |||
@Input() | |||
allowNull: boolean = true; | |||
|
|||
/** @param d Function used to disable certain dates in the calendar. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong function doc formatting as in calendar (won't retag all these)
@mikerodonnell89 you gotta sign CLA |
Fixes #687