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

fix(kit): InputDateTime should format textfield value on blur #7659

Merged
merged 5 commits into from
Jun 7, 2024

Conversation

alyonagerasimova
Copy link
Contributor

Closes #7638

Copy link

lumberjack-bot bot commented Jun 6, 2024

Pull request was closed ✔️

All saved screenshots (for current PR) were deleted 🗑️

Copy link

bundlemon bot commented Jun 6, 2024

BundleMon

Files added (5)
Status Path Size Limits
demo/browser/main.(hash).js
+392.19KB +10%
demo/browser/vendor.(hash).js
+214.57KB +10%
demo/browser/runtime.(hash).js
+41.33KB +10%
demo/browser/polyfills.(hash).js
+11.25KB +10%
demo/browser/styles.(hash).css
+1.39KB +10%

Total files change +660.73KB

Groups added (1)
Status Path Size Limits
demo/browser/*..js
+2.4MB -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history

@splincode splincode added the v3 label Jun 7, 2024
@nsbarsukov nsbarsukov changed the title fix(kit): fix InputDateTime format textfield value on blur fix(kit): InputDateTime should format textfield value on blur Jun 7, 2024
@@ -312,7 +312,7 @@ export class TuiInputDateTimeComponent
if (
this.value[0] === null ||
this.value[1] !== null ||
this.nativeValue.length <= this.fillerLength + DATE_TIME_SEPARATOR.length ||
this.nativeValue.length === this.fillerLength ||
Copy link
Member

Choose a reason for hiding this comment

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

@alyonagerasimova
Thanks for your contribution!

  • Could you add playwright tests for this case inside this file, please ?

    test('Good description', async ({page}) => {
        await tuiGoto(page, '/components/input-date-time/API?timeMode=HH:MM:SS.MSS');
    
        await inputDateTime.textfield.fill('07.06.2024, 23:59');
        await inputDateTime.textfield.blur();
    
        await expect(inputDateTime.textfield).toHaveValue('07.06.2024, 23:59:00.000');
    });
  • Cherry-pick your fix to main branch too, please

Copy link
Member

@nsbarsukov nsbarsukov Jun 7, 2024

Choose a reason for hiding this comment

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

I see you closed your previous PR to main:

Sorry for confusion.
Let's me clarify it.
We require this fix in both v3.x and main branches (2 PRs in total).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I prematurely deleted my first fork repository in order to fork it again. I will open a new PR in the main branch

Copy link
Contributor Author

@alyonagerasimova alyonagerasimova Jun 7, 2024

Choose a reason for hiding this comment

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

@splincode splincode requested a review from nsbarsukov June 7, 2024 10:26
@splincode splincode merged commit 505fe3e into taiga-family:v3.x Jun 7, 2024
30 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants