Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Multiple "format" has been broken for us in new v4 version

オープン
#911 コメント 2 件 リアクション 6 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
react, typescript
領域
frontend

調査の方向性

3.4.7 から v4 への移行において picker について説明されている format-list の動作を、06 や 06.05 などの入力を使って再現します。フォーマットのマッチングと onChange の動作を追跡します。完了の条件は、部分入力が編集可能なまま残り、完全一致の場合は意図どおりオートコンプリートされ、列挙されたフォーマットがカバーされていることです。

索引モデルが issue の本文から書いたものです。

説明

Use-case we have is more smart formatting with autocomplete, like if you enter 06 - it will assume that it is the 6th of current month of current year. But, and it is important, it were not trigger onChange (or, I assume it were, but didn't autocomplete the input until user explicitly trigger onChange by moving to other field, for example), so user could still add more to that, like 06.05, which would assume it is 5th month of current year.
To make it work we used format list like so

'DD.MM.YYYY', 'DD.M.YYYY', 'D.MM.YYYY', 'D.M.YYYY', 'DD.MM.YY', 'DD.M.YY', 'D.M.YY',
    'DD.MM', 'DD.M', 'D.M', 'DDMMYYYY', 'DDMMYY', 'DDMM', 'DD', 'D'

In the 3.4.7 -> v4 (like antd 5.13.3 -> 5.14.0) refactoring this approach does not work anymore, now it triggers onChange on any format match, like you enter 06 - it completes input with 06/02/2025, and user can't adjust it anymore.

As an additional feature request, I'd probably appreciate formatter/parser functionality with methods, like it is on InputNumber component to make it more stable.

主要言語
TypeScript
スター
304
フォーク
347
平均マージ
1日 2時間
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

react-component/picker のほかの issue

react-component/picker の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。