Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Date picker #237

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Add Date picker #237

wants to merge 4 commits into from

Conversation

vitPinchuk
Copy link
Contributor

Resolves: #236

@vitPinchuk vitPinchuk self-assigned this Jan 8, 2025
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.85%. Comparing base (60d2949) to head (c811b3a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #237      +/-   ##
==========================================
+ Coverage   98.83%   98.85%   +0.02%     
==========================================
  Files          71       74       +3     
  Lines        1625     1658      +33     
  Branches      484      489       +5     
==========================================
+ Hits         1606     1639      +33     
- Misses         18       19       +1     
+ Partials        1        0       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mikhail-vl mikhail-vl added the enhancement New feature or request label Jan 9, 2025
@mikhail-vl mikhail-vl added this to the Variable 3.7.0 milestone Jan 9, 2025
@@ -15,6 +15,7 @@ export enum DisplayMode {
*/
export enum MinimizeOutputFormat {
TEXT = 'text',
DATE_TIME = 'dateTime',
Copy link
Collaborator

Choose a reason for hiding this comment

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

please rename to DATETIME to be consistent over plugins

describe('getDateInLocalTimeFormat', () => {
it('formats date correctly for standard date', () => {
const date = new Date('2025-01-09T00:00:00');
expect(getDateInLocalTimeFormat(date)).toBe('2025-01-09');
Copy link
Collaborator

Choose a reason for hiding this comment

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

please use toEqual also for consistency

if (typeof date === 'string') {
currentValue = date.split('T')[0];
} else {
currentValue = isUseLocalTime ? getDateInLocalTimeFormat(date) : date.toISOString().split('T')[0];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Ready
Development

Successfully merging this pull request may close these issues.

Add Date only selector
3 participants