Skip to content

Commit

Permalink
fix(datepicker): fix exports
Browse files Browse the repository at this point in the history
  • Loading branch information
Leotheluck authored and dpellier committed Oct 11, 2023
1 parent 5e63f1a commit e0d5a13
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { EventEmitter } from '@stencil/core';
interface OdsDatepickerValueChangeEventDetail {
value?: Date | null;
oldValue?: Date | null;
formattedValue?: string;
}

type OdsDatepickerValueChangeEvent = CustomEvent<OdsDatepickerValueChangeEventDetail>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export class OsdsDatepicker implements OdsDatepickerAttribute, OdsDatepickerEven
}

emitDatepickerValueChange(newValue: Date | undefined | null, oldValue?: Date | undefined | null): void {
this.odsDatepickerValueChange.emit({ value: newValue, oldValue: oldValue });
this.odsDatepickerValueChange.emit({ value: newValue, oldValue: oldValue, formattedValue: newValue && this.format ? Datepicker.formatDate(newValue, this.format) : undefined });
}

onBlur(): void {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export type { OdsDatepickerAttribute } from './interfaces/attributes';
export type { OdsDatepickerEvent, OdsDatepickerValueChangeEvent, OdsDatepickerValueChangeEventDetail } from './interfaces/events';
export { ODS_DATEPICKER_DAY, ODS_DATEPICKER_DAYS } from './constants/datepicker-day';
export { OsdsDatepicker } from './osds-datepicker';

0 comments on commit e0d5a13

Please sign in to comment.