我的UIDatePicker设置为UIDatePickerModeTime,但在苹果文档中显示为The date picker displays hours, minutes, and (optionally) an AM/PM designation. The exact items shown and their order depend upon the locale set. An example of this mode is [ 6 | 53 | PM ].。我如何添加AM/PM,因为在我的设备上,这些都不是选项,而是使用24小时制?
我有一个同时具有mgt-people和mgt-people-picker的React组件,它从其父组件中获取道具。这个想法是通过从mgt-people-picker中选择人员来更新mgt-people,但它不起作用。它确实在简单的<div>{props.users}</div>中进行了更新,所以我认为这可能是管理组件的问题?我还尝试在子组件中将users设置为本地状态,但也不起作用。
我的简化代码如下所示。所有users变量的类型均为string[]
父级:
function updateUsers(newUsers) {
setState({ users: n