Skip to content

Commit

Permalink
feat(datepicker): add input size and input label type as prop to date…
Browse files Browse the repository at this point in the history
…picker
  • Loading branch information
dilandoogan committed Dec 3, 2024
1 parent cb11c42 commit 1fec4ae
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/components/datepicker/bl-datepicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { event, EventDispatcher } from "../../utilities/event";
import "../calendar/bl-calendar";
import { CALENDAR_TYPES } from "../calendar/bl-calendar.constant";
import "../input/bl-input";
import BlInput from "../input/bl-input";
import BlInput, { InputSize } from "../input/bl-input";
import "../tooltip/bl-tooltip";
import style from "./bl-datepicker.css";

Expand All @@ -26,6 +26,17 @@ export default class BlDatepicker extends DatepickerCalendarMixin {
*/
@property({ type: String, attribute: "placeholder", reflect: true })
placeholder: string;
/**
* Sets input size.
*/
@property({ type: String, reflect: true })
inputSize?: InputSize = "medium";

/**
* Makes datepicker input label as fixed positioned
*/
@property({ type: Boolean, attribute: "input-label-fixed", reflect: true })
inputLabelFixed = false;
/**
* Defines the datepicker input label
*/
Expand All @@ -34,7 +45,7 @@ export default class BlDatepicker extends DatepickerCalendarMixin {
/**
* Defines the custom formatter function
*/
@property({ type: Function, attribute: "value-formatter" })
@property({ type: Function, attribute: "input-value-formatter" })
inputValueFormatter: ((dates: Date[]) => string) | null = null;
/**
* Sets datepicker to disabled
Expand Down Expand Up @@ -253,6 +264,8 @@ export default class BlDatepicker extends DatepickerCalendarMixin {
@click=${this._togglePopover}
help-text=${this.helpText}
?disabled=${this.disabled}
.size=${this.inputSize}
.labelFixed=${this.inputLabelFixed}
readonly
>
<div slot="icon" class="icon-container" id="icon-container">
Expand Down

0 comments on commit 1fec4ae

Please sign in to comment.