Date format is inconsistent (iOS only?)

未关闭
#881 9 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
ios, javascript, react-native
领域
mobile

调研方向

Start by reproducing the issue in the iOS example app using the reported setup, then trace how the selected date is formatted for the closed picker button. The report does not name implementation files or tests; identify the iOS display path and any related formatting tests. Done means selecting March 20, 2024 displays “Mar 20, 2024” on the button. The issue has gone 598 days without a comment.

由索引模型根据 Issue 内容生成。

描述

Bug Report

Summary

At least on iOS, the date format as displayed on the button when the picker is not open is inconsistent.

Reproducible sample code

Simply clone this repository, install deps via yarn install && cd example && npx pod-install, then build and run the app on any iOS target.

Steps to reproduce

  1. Open the iOS Date Picker
  2. Select March 20, 2024
  3. The button shows "3/20/2024"

Describe what you expected to happen:

  1. Open the iOS Date Picker
  2. Select March 20, 2024
  3. The button shows "Mar 20, 2024"

Environment info

npx react-native info output:

System:
  OS: macOS 14.4.1
  CPU: (10) arm64 Apple M1 Max
  Memory: 98.97 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.9.0
    path: ~/.nvm/versions/node/v20.9.0/bin/node
  Yarn:
    version: 1.22.19
    path: /opt/homebrew/bin/yarn
  npm:
    version: 8.19.4
    path: ~/datetimepicker/node_modules/.bin/npm
  Watchman:
    version: 2024.01.22.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.2
    path: /Users/brandon/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK:
    API Levels:
      - "27"
      - "30"
      - "31"
      - "33"
      - "34"
    Build Tools:
      - 28.0.2
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 33.0.0
      - 33.0.1
      - 34.0.0
    System Images:
      - android-30 | Google APIs ARM 64 v8a
      - android-34 | Google APIs ARM 64 v8a
      - android-UpsideDownCakePrivacySandbox | Google Play ARM 64 v8a
      - android-VanillaIceCream | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10227.8.2321.11479570
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.4.1
    path: /Users/brandon/.jenv/shims/javac
  Ruby:
    version: 3.2.1
    path: /Users/brandon/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.7
    wanted: ^0.72.7
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: false
  newArchEnabled: true
iOS:
  hermesEnabled: false
  newArchEnabled: false

datetimepicker version: 7.6.4

iOS / Android version: 17.4

主要语言
JavaScript
星标
2.9k
派生
459
平均合并
4 天 16 小时
30 天内合并 PR
5

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

react-native-datetimepicker/datetimepicker 的其他 Issue

查看 react-native-datetimepicker/datetimepicker 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。