[React-Native-Windows] Cant format the date, change input styles (font family, font size) and change language
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, react-native
- 領域
- mobile
調査の方向性
Start by reading the React Native Windows implementation and its date picker prop definitions; the issue provides no file or test names. Check how Windows handles date formatting, text styling, and locale for the shown DateTimePicker props. Done means establishing which of these behaviors are supported and fixing the reported ones with coverage; the issue has no reproducible sample or environment details for the picker itself.
索引モデルが issue の本文から書いたものです。
説明
Bug report
Summary
Hello!
Guys im using React Native Windows, and i want to do some basic stuff but i cant!
this is how i'm using it
<DateTimePicker mode="date" display="default" locale={"es"} testID="date-input" onChange={(event, selectedDate) => { const currentDate = selectedDate || values.dateOfBirth; setFieldValue('dateOfBirth', currentDate); onChange('dateOfBirth', currentDate.toISOString()); }} value={values.dateOfBirth} style={[styles.codeInput, {height: 55}]} textColor="red" // this color also doesnt work />
- Format: Apparently i cannot format the date is getting displayed in the input (It gets the format from the system), when trying to use the formatDate im getting an error
Type '{ mode: "date"; display: "default"; locale: string; dateFormat: string; testID: string; onChange: (event: DateTimePickerEvent, selectedDate: Date) => void; value: Date; style: ({ ...; } | { ...; })[]; textColor: string; }' is not assignable to type 'IntrinsicAttributes & (Readonly<Readonly<Omit<ViewProps, "children"> & BaseOptions & { maximumDate?: Date; minimumDate?: Date; } & { ...; }> & { ...; }> | Readonly<...> | Readonly<...>)'. Property 'dateFormat' does not exist on type '(IntrinsicAttributes & Readonly<Readonly<Omit<ViewProps, "children"> & BaseOptions & { maximumDate?: Date; minimumDate?: Date; } & { ...; }> & { ...; }>) | (IntrinsicAttributes & Readonly<...>)'.ts(2322)
-
Styling: I cannot style the text in the input, i want to be able to change the font family and the font size and its no possible
-
Locale: I configured my Datepicker to locale='es' or locale='es-ES' and its always in english, is it possible to change ?
Reproducible sample code
I cant have a reproduceable code for react native windows, please refer to the summary theres nothing much to add there
Steps to reproduce
use it like this
<DateTimePicker mode="date" display="default" locale={"es"} testID="date-input" onChange={(event, selectedDate) => { const currentDate = selectedDate || values.dateOfBirth; setFieldValue('dateOfBirth', currentDate); onChange('dateOfBirth', currentDate.toISOString()); }} value={values.dateOfBirth} style={[styles.codeInput, {height: 55}]} textColor="red" // this color also doesnt work />
and you wont be able to format your date, style the input or change the locale
Environment info
npx react-native info output: System:
OS: Windows 11 10.0.26100
CPU: (8) x64 Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz
Memory: 10.90 GB / 31.73 GB
Binaries:
Node:
version: 18.20.8
path: c:\Program Files\nodejs\node.EXE
Yarn:
version: 1.22.22
path: C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm:
version: 10.8.2
path: c:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
Versions:
- 10.0.18362.0
- 10.0.19041.0
- 10.0.22621.0
IDEs:
Android Studio: Not Found
Visual Studio:
- 17.13.35825.156 (Visual Studio Community 2022)
Languages:
Java: Not Found
Ruby: Not Found
npmPackages:
"@react-native-community/cli":
installed: 15.0.1
wanted: 15.0.1
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.77.2
wanted: ^0.77.0
react-native-windows:
installed: 0.77.0
wanted: 0.77.0
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
info React Native v0.79.2 is now available (your project is running on v0.77.2).
# paste it here
Time zone name (If the problem you have is related to unexpected time / date. See list in https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
"@react-native-community/datetimepicker": "^8.3.0",
iOS / Android version: Im using Windows
- 主要言語
- JavaScript
- スター
- 2.9k
- フォーク
- 459
- 平均マージ
- 4日 16時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react-native-datetimepicker/datetimepicker のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
react-native-datetimepicker/datetimepicker#1070 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
react-native-datetimepicker/datetimepicker#1047 · コメント 6 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
react-native-datetimepicker/datetimepicker#1046 · コメント 1 件 ·
react-native-datetimepicker/datetimepicker の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Fei-Away/Codex-Dream-Skin#449 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
outline/outline#14489 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Claude Code plugin does not wire the edit-time Floor hook対応中かも @dgr8akki が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
Administration: required plugin configuration field stays invalid after restoring its saved valueオープンneeds-triage Platform(Default)
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信