Skip to content

Commit

Permalink
Added placeholder option for datepicker
Browse files Browse the repository at this point in the history
  • Loading branch information
TriangleJuice committed Jun 30, 2022
1 parent 3b88455 commit 081beb4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

## v6.3.1 - 2022-01-24
## v6.4.0 - 2022-xx-xx

### Added
- Added support for React 18
- `Form` - Added placeholder option for datepicker

### Fixed
- Made sure no extra space is created when flyout is closed
Expand Down
1 change: 1 addition & 0 deletions packages/form/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ const Datepicker = require('./src').Datepicker;
name={"datepicker-name"}
label={"Datepicker with input mask"}
format={"DD/MM/YYYY"}
placeholder={"dd/mm/yyyy"}
mask={"99/99/9999"}
required={true}
onChange={(date, isValid) => console.log('date is ' + date + ', and is valid ' + isValid)}
Expand Down
4 changes: 4 additions & 0 deletions packages/form/src/Datepicker/Datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ type
disabled?: boolean,
/** If it should be free text input or click only */
readOnly?: boolean,
/** Set a placeholder. */
placeholder?: string,
/** enable/disable the days during the weekend. */
noWeekends?: boolean,
/** Every date less than this date will be disabled. */
Expand Down Expand Up @@ -191,6 +193,7 @@ class Datepicker extends Component<Props> {
required,
disabled,
readOnly,
placeholder,
name,
format,
locale = 'nl',
Expand Down Expand Up @@ -235,6 +238,7 @@ class Datepicker extends Component<Props> {
name={name}
id={id || this.defaultId}
value={input}
placeholder={placeholder}
required={required}
readOnly={readOnly}
disabled={disabled}
Expand Down

0 comments on commit 081beb4

Please sign in to comment.