[#71351] Teach Single/Range Date Picker support for placeholder text#21911
Merged
[#71351] Teach Single/Range Date Picker support for placeholder text#21911
placeholder text#21911Conversation
placeholder text
aad9813 to
08a1dbc
Compare
13 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Adds placeholder support to the Primer form DatePicker components by plumbing the placeholder value from the Ruby form DSL through the Rails-rendered Angular component tag into the Angular datepicker inputs.
Changes:
- Make
datepicker_optionsoptional forSingleDatePickerInput(and by inheritanceRangeDatePickerInput), simplifying call sites and specs. - Pass
placeholderthroughDatePicker’s Rails template into Angular component inputs. - Add Angular
@Input() placeholderbindings and new specs validatingdata-placeholderoutput for single and range date pickers.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| spec/lib/primer/open_project/forms/dsl/input_methods_spec.rb | Updates DSL specs to reflect datepicker_options now being optional. |
| spec/lib/primer/open_project/forms/date_picker_spec.rb | Adds coverage asserting placeholder is emitted as data-placeholder for both date picker variants. |
| modules/backlogs/app/forms/backlogs/backlog_header_form.rb | Removes redundant datepicker_options: {} now that the default exists. |
| lib/primer/open_project/forms/dsl/single_date_picker_input.rb | Makes datepicker_options default to {} to support optional usage. |
| lib/primer/open_project/forms/date_picker.html.erb | Wires placeholder into Angular component inputs (currently always emitted). |
| frontend/src/app/shared/components/datepicker/basic-single-date-picker/basic-single-date-picker.component.ts | Adds @Input() placeholder. |
| frontend/src/app/shared/components/datepicker/basic-single-date-picker/basic-single-date-picker.component.html | Binds placeholder to the rendered <input> elements. |
| frontend/src/app/shared/components/datepicker/basic-range-date-picker/basic-range-date-picker.component.ts | Adds @Input() placeholder. |
| frontend/src/app/shared/components/datepicker/basic-range-date-picker/basic-range-date-picker.component.html | Binds placeholder to the rendered <input> elements. |
Add `placeholder` `@Input` to both `OpBasicSingleDatePickerComponent` and `OpBasicRangeDatePickerComponent`, and pass it through from the server-rendered ERB template via `angular_component_tag`. For the range picker on mobile, the same placeholder is used for both start and end date fields. Default `placeholder` to an empty string when not provided, to avoid `angular_component_tag` serializing `nil` as `"null"`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Default `datepicker_options` to `{}` in `SingleDatePickerInput`
(inherited by `RangeDatePickerInput`), and remove now-redundant
empty hash arguments from callsites.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
08a1dbc to
ab76984
Compare
placeholder textplaceholder text
Base automatically changed from
feature/57688-primerize-backlogs-classic
to
dev
February 9, 2026 15:23
bsatarnejad
approved these changes
Feb 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
This PR is based off #21723. Please review/merge that PR first.
Ticket
https://community.openproject.org/work_packages/71351
What are you trying to accomplish?
OpBasicSingleDatePickerComponentandOpBasicRangeDatePickerComponents to support passing aplaceholdervalue.placeholderas a date attribute.SingleDatePickerInput'sdatepicker_optionsparam optional.Screenshots
Merge checklist