Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"chooseDate": "Choose date"
"chooseDate": "Choose date",
"dateFormat": "Date Format:"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"chooseDate": "Choose date"
"chooseDate": "Choose date",
"dateFormat": "Date Format:"
}
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,7 @@
}

@include hidden-form-input();

.assistive-text {
@apply sr-only;
}
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ export class InputDatePicker
<calcite-input
aria-autocomplete="none"
aria-controls={this.dialogId}
aria-describedby={this.placeholderTextId}
aria-expanded={toAriaBoolean(this.open)}
aria-haspopup="dialog"
class={`input ${
Expand All @@ -550,6 +551,9 @@ export class InputDatePicker
ref={this.setStartInput}
/>
{this.renderToggleIcon(this.open && this.focusedInput === "start")}
<span aria-hidden="true" class={CSS.assistiveText} id={this.placeholderTextId}>
Date Format: {this.localeData?.placeholder}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be localized right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, updated.

</span>
</div>
<div
aria-hidden={toAriaBoolean(!this.open)}
Expand Down Expand Up @@ -729,6 +733,8 @@ export class InputDatePicker

private valueAsDateChangedExternally = false;

private placeholderTextId = `calcite-input-date-picker-placeholder-${guid()}`;

//--------------------------------------------------------------------------
//
// Private Methods
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const CSS = {
assistiveText: "assistive-text",
menu: "menu-container",
menuActive: "menu-container--active",
toggleIcon: "toggle-icon"
Expand Down