Commit 77beaa3
### Proposed Changes
Fixes the Date, Date/Time and Time field pickers in the new Edit
Contentlet (issue #36156):
* **Width** — Removed the `w-full` class, `[inputStyleClass]="'w-full'"`
binding and the `width: 100%` SCSS override. The picker now uses
PrimeNG's default datepicker sizing (`display: inline-flex`, hugging the
input + dropdown button) instead of stretching full width. No hard-coded
magic number.
* **Close behavior** — Set `[hideOnDateTimeSelect]="false"` so the panel
stays open after a date is clicked and only closes on click-outside.
This lets users complete the time portion on Date/Time and Time fields.
Consistent across all three field types. The selected value is still
applied on `(onSelect)`, so it is correctly persisted when the picker
closes.
* Added spec coverage for both behaviors across Date, Date/Time and
Time.
https://github.com/user-attachments/assets/1ac2a867-7686-4004-964d-2874797f3f97
### Checklist
- [x] Tests
- [ ] Translations
- [x] Security Implications Contemplated (none — frontend
presentation/UX only)
### Additional Info
Single-component change: all three field types are rendered by
`dot-calendar-field`, so the fix applies to Date, Date/Time and Time
automatically. No API/backend changes.
Verification:
- `pnpm nx test edit-content` → 1871 passed (includes 6 new cases)
- `pnpm nx lint edit-content` → 0 errors
### Screenshots
Original | Updated
:-------------------------:|:-------------------------:
_full-width picker, closes on date click_ | _fixed-width picker, stays
open until click-outside_
Closes #36156
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent f8de42d commit 77beaa3
3 files changed
Lines changed: 58 additions & 4 deletions
File tree
- core-web/libs/edit-content/src/lib/fields/dot-edit-content-calendar-field
- components/calendar-field
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| 12 | + | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
Lines changed: 55 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
445 | 500 | | |
446 | 501 | | |
447 | 502 | | |
| |||
0 commit comments