Skip to content

Commit

Permalink
docs(date-picker): add documentation to the date picker
Browse files Browse the repository at this point in the history
  • Loading branch information
jgroth authored and adrianschmidt committed Sep 10, 2019
1 parent 7298106 commit f0f140f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/date-picker/date-picker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ menu: Components

# Date picker

<limel-example-date-picker />
<limel-props name="limel-date-picker" />

## Example

<limel-example name="limel-example-date-picker" />
28 changes: 28 additions & 0 deletions src/components/date-picker/date-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,49 @@ import { YearPicker } from './pickers/YearPicker';
styleUrl: 'date-picker.scss',
})
export class DatePicker {
/**
* Disables the date picker when `true`.
* Defaults to `false`.
*/
@Prop()
public disabled: boolean;

/**
* Set to `true` to indicate that the current value of the date picker is
* invalid.
* Defaults to `false`.
*/
@Prop()
public invalid: boolean;

/**
* Text to display next to the date picker
*/
@Prop()
public label: string;

/**
* Set to `true` to indicate that the field is required.
* Defaults to `false`.
*/
@Prop()
public required: boolean;

/**
* The value of the field.
*/
@Prop()
public value: Date;

/**
* Type of date picker. Defaults to `datetime`
*/
@Prop()
public type: DateType = 'datetime';

/**
* Format to display the selected date in
*/
@Prop()
public format: string;

Expand All @@ -44,6 +69,9 @@ export class DatePicker {
@Element()
private host: HTMLElement;

/**
* Emitted when the date picker value is changed.
*/
@Event()
private change: EventEmitter;

Expand Down

0 comments on commit f0f140f

Please sign in to comment.