mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
fix(MobileDatePicker): reorder imports and update date range limits (#7117)
This commit is contained in:
parent
a9bd6f7844
commit
d538cd7db7
@ -7,10 +7,10 @@
|
||||
* For more information, please refer to: https://www.nocobase.com/agreement.
|
||||
*/
|
||||
|
||||
import React, { useState, useCallback } from 'react';
|
||||
import { DatePicker } from 'antd-mobile';
|
||||
import { mapDatePicker, DatePicker as NBDatePicker } from '@nocobase/client';
|
||||
import { connect, mapProps, mapReadPretty } from '@formily/react';
|
||||
import { mapDatePicker, DatePicker as NBDatePicker } from '@nocobase/client';
|
||||
import { DatePicker } from 'antd-mobile';
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
function getPrecision(timeFormat: string): 'hour' | 'minute' | 'second' {
|
||||
@ -90,8 +90,8 @@ const MobileDateTimePicker = connect(
|
||||
}}
|
||||
precision={showTime ? getPrecision(timeFormat) : picker === 'date' ? 'day' : picker}
|
||||
renderLabel={labelRenderer}
|
||||
min={new Date(1000, 0, 1)}
|
||||
max={new Date(9999, 11, 31)}
|
||||
min={new Date(1950, 0, 1)}
|
||||
max={new Date(2050, 11, 31)}
|
||||
onConfirm={(val) => {
|
||||
handleConfirm(val);
|
||||
}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user