vaadin / vaadin/framework

Date field should have a style generator

Open
#10,856 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement needs design workaround
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

The current API for date field styling allows for styling specific dates, but it does not allow for styling recurring patterns (for example, having a separate style for Saturdays and Sundays). Using setDateStyle(...) is not really viable here since one would have to manually set styles for all Saturdays and Sundays for an arbitrary time period forward and backward.

The solution would be to add a setDateStyleGenerator(...), similar to what is currently preset on Grid.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the date field API that provides setDateStyle(...) and compare it with the style-generator API already preset on Grid. Define the matching setDateStyleGenerator(...) behavior for recurring date patterns, including Saturdays and Sundays, and verify that generated styles apply across arbitrary dates rather than requiring individual date assignments.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.