Datepicker api

Overview
API
Theme
Examples

NbDatepickerDirective

Inputs

NameTypeDescription
nbDatepickerNbDatepicker

Provides datepicker component.

Properties

NameTypeDescription
datepickerAdapterNbDatepickerAdapter<D>

Datepicker adapter.

pickerNbDatepicker<D>

Datepicker instance.

validatorValidatorFn

Form control validators will be called in validators context, so, we need to bind them.

inputHTMLInputElement

Returns html input element.

inputValuestring

Returns host input value.

Methods

NameDescription
chooseDatepickerAdapter()
returns:void

Chooses datepicker adapter based on passed picker component.

filterValidator()
returns:

Validates passed value satisfy the filter.

handleInputChange()
parameters: value: string
returns:void

Parses input value and write if it isn't null.

hidePicker()
returns:void

Hides picker, focuses the input

maxValidator()
returns:

Validates passed value is smaller than max.

minValidator()
returns:

Validates passed value is greater than min.

noDatepickerAdapterProvided()
returns:boolean

Validates if no datepicker adapter provided.

parseValidator()
returns:

Validates that we can parse value correctly.

setupPicker()
returns:void

Attaches picker to the host input element and subscribes on value changes.

validate()
returns:

Form control validation based on picker validator config.

writeValue()
parameters: value:
returns:void

Writes value in picker and html input element.

NbDatepickerComponent

Inputs

NameTypeDescription
dateD

Date which will be rendered as selected.

Outputs

NameTypeDescription
dateChangeEventEmitter

Emits date when selected.

NbRangepickerComponent

Inputs

NameTypeDescription
rangeNbCalendarRange

Range which will be rendered as selected.

Outputs

NameTypeDescription
rangeChangeEventEmitter

Emits range when start selected and emits again when end selected.

NbDateTimePickerComponent

Inputs

NameTypeDescription
stepnumber

Defines minutes step when we use fill time format. If set to 20, it will be: '12:00, 12:20: 12:40, 13:00...'

singleColumnboolean

Show timepicker values in one column with 60 minutes step by default.

twelveHoursFormatboolean

Defines 12 hours format like '07:00 PM'.

withSecondsboolean

Show seconds in timepicker. Ignored when singleColumn is true.

Outputs

NameTypeDescription
dateTimeChangeEventEmitter

Emits date with time when selected.

Autocomplete
Previous page
Timepicker
Next page

Need some help or found an issue?

Ask on Stack Overflow with tag `nebular` or post an issue on GitHub.