mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-23 18:50:06 +08:00
1 line
9.3 KiB
JavaScript
1 line
9.3 KiB
JavaScript
(("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd=("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd||[]).push([["e3f37d6a"],{e3f37d6a:function(e,a,d){"use strict";d.d(a,"__esModule",{value:!0}),d.d(a,"texts",{enumerable:!0,get:function(){return n;}}),d("39d9ff9a");let n=[{value:"\u5728 antd \u4E2D\uFF0CDatePicker \u7684 issue \u975E\u5E38\u591A\u3002\u4E00\u6765\u662F\u7531\u4E8E\u65E5\u671F\u9009\u62E9\u9700\u6C42\u7684\u5E38\u89C1\u6027\uFF0C\u53E6\u4E00\u6765\u662F\u9488\u5BF9\u4E1A\u52A1\u7684\u9700\u6C42\u4F1A\u6709\u5404\u79CD\u5404\u6837\u7684\u7981\u7528\u9009\u62E9\u7EC4\u5408\u3002\u4ECA\u5929\uFF0C\u6211\u4EEC\u5C31\u6765\u804A\u804A ",paraId:0},{value:"disabledDate",paraId:0},{value:" \u8FD9\u4E2A API\u3002",paraId:0},{value:"\u5982\u5176\u540D\uFF0C",paraId:1,tocIndex:0},{value:"disabledDate",paraId:1,tocIndex:0},{value:" \u7528\u4E8E\u5BF9\u65E5\u671F\u8FDB\u884C\u7981\u7528\u3002\u6240\u4EE5\u5F53\u4F7F\u7528 DateTimePicker \u65F6\uFF0C\u65F6\u95F4\u90E8\u5206\u5E76\u4E0D\u4F1A\u88AB ",paraId:1,tocIndex:0},{value:"disabledDate",paraId:1,tocIndex:0},{value:" \u8FDB\u884C\u63A7\u5236\u3002\u800C\u662F\u9700\u8981\u901A\u8FC7 ",paraId:1,tocIndex:0},{value:"disabledTime",paraId:1,tocIndex:0},{value:" \u65B9\u6CD5\u8FDB\u884C\u63A7\u5236\u3002\u8FD9\u4F3C\u4E4E\u6709\u70B9\u53CD\u76F4\u89C9\uFF0C\u4E3A\u4EC0\u4E48\u9700\u8981\u7528\u4E24\u4E2A API \u7BA1\u7406\u5462\uFF1F",paraId:1,tocIndex:0},{value:"\u4ECE\u76F4\u89C9\u4E0A\u770B\uFF0C\u4E00\u4E2A\u65E5\u671F\u662F\u5426\u7981\u7528\u6211\u4EEC\u53EA\u9700\u8981\u5C06\u5F53\u524D\u65E5\u671F\u6267\u884C\u4E00\u6B21 ",paraId:2,tocIndex:1},{value:"disabledDate",paraId:2,tocIndex:1},{value:" \u5373\u53EF\u77E5\u9053\u3002\u4F46\u662F\uFF0C\u5982\u679C\u5F53\u6211\u4EEC\u628A\u9762\u677F\u5207\u6362\u6210\u6708\u4EFD\u9762\u677F\u7684\u65F6\u5019\uFF0C\u6211\u4EEC\u600E\u4E48\u77E5\u9053\u5F53\u524D\u6708\u4EFD\u662F\u5426\u53EF\u9009\u5462\uFF1F\u6211\u4EEC\u5FC5\u987B\u8981\u5BF9\u8BE5\u6708\u4E0B\u7684\u6BCF\u4E2A\u65E5\u671F\u8FDB\u884C\u4E00\u6B21 ",paraId:2,tocIndex:1},{value:"disabledDate",paraId:2,tocIndex:1},{value:" \u624D\u80FD\u786E\u5B9A\u8BE5\u6708\u4E0B\u6709\u53EF\u9009\u65E5\u671F\uFF0C\u56E0\u6B64\u8BE5\u6708\u624D\u80FD\u9009\u62E9\u3002",paraId:2,tocIndex:1},{value:"\u4ECE\u76EE\u524D\u770B\uFF0C\u8FD9\u4E2A\u903B\u8F91\u4F3C\u4E4E\u6CA1\u95EE\u9898\u3002\u4E00\u4E2A\u6708 30 \u6765\u5929\uFF0C\u6708\u4EFD\u9762\u677F 12 \u4E2A\u6708\uFF0C\u6700\u574F\u60C5\u51B5\u4E0B\uFF0C\u6211\u4EEC\u4E5F\u53EA\u9700\u8981\u904D\u5386 365 \u6B21\u5C31\u80FD\u77E5\u9053 12 \u4E2A\u6708\u4EFD\u662F\u4E0D\u53EF\u9009\u7684\u3002\u4F46\u662F\u4EE5\u6B64\u7C7B\u63A8\uFF0C\u5F53\u9762\u677F\u5207\u6362\u4E3A\u5E74\u3001\u5341\u5E74\u65F6\u3002\u6211\u4EEC\u9700\u8981\u904D\u5386\u7684\u6B21\u6570\u5C31\u4F1A\u5448\u6307\u6570\u7EA7\u589E\u957F\uFF0C\u5BFC\u81F4\u4E25\u91CD\u7684\u6027\u80FD\u95EE\u9898\uFF08",paraId:3,tocIndex:1},{value:"#39991",paraId:3,tocIndex:1},{value:"\uFF09\u3002",paraId:3,tocIndex:1},{value:"\u6240\u4EE5\u5728 DatePicker \u91CD\u6784\u540E\uFF0C",paraId:4,tocIndex:1},{value:"disabledDate",paraId:4,tocIndex:1},{value:" \u63D0\u4F9B\u4E86\u989D\u5916\u7684\u53C2\u6570 ",paraId:4,tocIndex:1},{value:"info.type",paraId:4,tocIndex:1},{value:"\uFF0C\u544A\u77E5\u63D0\u4F9B\u7684 date \u5BF9\u8C61\u6765\u81EA\u4E8E\u54EA\u4E2A Panel\u3002\u8FD9\u6837\u5F00\u53D1\u8005\u5C31\u53EF\u4EE5\u6839\u636E Panel \u6765\u63D0\u4F9B ",paraId:4,tocIndex:1},{value:"disabled",paraId:4,tocIndex:1},{value:" \u4FE1\u606F\uFF0C\u4ECE\u800C\u907F\u514D\u6050\u6016\u7684\u8C03\u7528\u5FAA\u73AF\u3002",paraId:4,tocIndex:1},{value:"\u4F46\u662F\u4F5C\u4E3A\u515C\u5E95\uFF0CDatePicker \u4F1A\u5BF9\u5F53\u524D Panel \u5355\u5143\u7684\u7B2C\u4E00\u5929\u548C\u6700\u540E\u4E00\u5929\u8FDB\u884C ",paraId:5,tocIndex:1},{value:"disabledDate",paraId:5,tocIndex:1},{value:" \u7684\u8C03\u7528\u3002\u8FD9\u6837\u53EF\u4EE5\u786E\u4FDD\u5728\u5E38\u89C1\u7684\u8303\u56F4\u7981\u7528\u573A\u666F\u4E0B\uFF0C\u4ECD\u80FD\u6EE1\u8DB3\u9700\u6C42\u3002",paraId:5,tocIndex:1},{value:"\u56DE\u5230\u65F6\u95F4\u7981\u7528\uFF0C\u8FD9\u662F\u76F8\u540C\u7684\u95EE\u9898\u3002\u5982\u679C\u6211\u4EEC\u901A\u8FC7 ",paraId:6,tocIndex:2},{value:"disabledDate",paraId:6,tocIndex:2},{value:" \u8FDB\u884C\u65F6\u95F4\u7EF4\u5EA6\u7684\u7981\u7528\uFF0C\u90A3\u4E48\u5728 DateTimePicker \u4E0B\u8BE5\u5929\u662F\u5426\u53EF\u9009\uFF0C\u6211\u4EEC\u5C31\u9700\u8981\u5BF9\u8BE5\u5929\u7684\u6BCF\u4E00\u79D2\u8FDB\u884C ",paraId:6,tocIndex:2},{value:"disabledDate",paraId:6,tocIndex:2},{value:" \u6821\u9A8C\u3002\u5728\u6700\u574F\u60C5\u51B5\u4E0B\uFF0C\u4E00\u5929\u662F\u5426\u53EF\u9009\u5C31\u9700\u8981\u6821\u9A8C 86400 \u6B21\u3002Date Panel \u5C31\u9700\u8981\u6267\u884C ~200 \u4E07\u6B21\u3002\u663E\u7136\u8FD9\u662F\u4E0D\u53EF\u63A5\u53D7\u7684\u3002",paraId:6,tocIndex:2},{value:"\u6240\u4EE5\u5BF9\u4E8E\u65F6\u95F4\u7EF4\u5EA6\uFF0C\u6211\u4EEC\u63D0\u4F9B\u4E86 ",paraId:7,tocIndex:2},{value:"disabledTime",paraId:7,tocIndex:2},{value:" \u65B9\u6CD5\u3002\u8FD9\u4E2A\u65B9\u6CD5\u76F8\u6BD4 ",paraId:7,tocIndex:2},{value:"disabledDate",paraId:7,tocIndex:2},{value:" \u4F1A\u8981\u6C42\u63D0\u4F9B\u66F4\u7EC6\u7EC6\u7C92\u5EA6\u7684\u65F6\u95F4\u7981\u7528\u4FE1\u606F\uFF1A",paraId:7,tocIndex:2},{value:"type DisabledTime = (now: Dayjs) => {\n disabledHours?: () => number[];\n disabledMinutes?: (selectedHour: number) => number[];\n disabledSeconds?: (selectedHour: number, selectedMinute: number) => number[];\n disabledMilliseconds?: (\n selectedHour: number,\n selectedMinute: number,\n selectedSecond: number,\n ) => number[];\n};\n",paraId:8,tocIndex:2},{value:"\uFF08\u65F6\u95F4\u9009\u62E9\u9762\u677F\u7684\u6BCF\u4E2A\u5355\u4F4D\u90FD\u76F8\u5F53\u4E8E\u65E5\u671F\u9762\u677F\u7684 Panel\uFF0C\u540E\u8005\u901A\u8FC7\u524D\u8005\u5355\u4F4D\u7684\u4FE1\u606F\u6765\u63A8\u51FA\u5F53\u524D\u7981\u7528\u5355\u4F4D\uFF09",paraId:9,tocIndex:2},{value:"\u5728\u4E86\u89E3\u4E86\u4E0A\u4E0B\u6587\u540E\uFF0C\u6211\u4EEC\u4F1A\u53D1\u73B0 ",paraId:10,tocIndex:3},{value:"disabledDate",paraId:10,tocIndex:3},{value:" \u548C ",paraId:10,tocIndex:3},{value:"disabledTime",paraId:10,tocIndex:3},{value:" \u867D\u7136\u8BBE\u8BA1\u662F\u5408\u7406\u7684\uFF0C\u4F46\u662F\u5374\u6709\u4E9B\u504F\u5E95\u5C42\u3002\u5728\u4E1A\u52A1\u4E2D\u8FDB\u884C\u4F7F\u7528\u4F1A\u6BD4\u8F83\u9EBB\u70E6\uFF0C\u6211\u4EEC\u6765\u770B\u51E0\u4E2A\u4F8B\u5B50\uFF08\u5F53\u7136\uFF0C\u5728\u4E1A\u52A1\u4E2D\u4F60\u9700\u8981\u8003\u8651\u901A\u8FC7 HOC \u6765\u8FDB\u884C\u5C01\u88C5\uFF09\uFF1A",paraId:10,tocIndex:3},{value:"\u6682\u65F6\u4E0D\u8003\u8651\u8282\u5047\u65E5\u7684\u60C5\u51B5\uFF0C\u6211\u4EEC\u9009\u62E9\u5DE5\u4F5C\u65E5\u7684 9:00 ~ 17:00 \u4E3A\u53EF\u9009\u65F6\u95F4\uFF1A",paraId:11,tocIndex:4},{value:"const disabledDate = (date, info) => {\n if (info.type === 'date') {\n return date.day() === 0 || date.day() === 6;\n }\n return false;\n};\n\nconst disabledTime = () => ({\n disabledHours: () => {\n return Array.from({ length: 24 }, (_, i) => i).filter((hour) => hour < 9 || hour > 17);\n },\n});\n",paraId:12,tocIndex:4},{value:"\u5728 DatePicker \u4E2D\u6709 ",paraId:13,tocIndex:5},{value:"minDate",paraId:13,tocIndex:5},{value:" \u548C ",paraId:13,tocIndex:5},{value:"maxDate",paraId:13,tocIndex:5},{value:" \u7528\u4E8E\u9650\u5236\u65E5\u671F\u7684\u9009\u62E9\u8303\u56F4\uFF0C\u4F46\u662F\u5982\u679C\u5B83\u4EEC\u4EC5\u9650\u4E8E\u65E5\u671F\u7684\u9650\u5236\u3002\u73B0\u5728\uFF0C\u5047\u8BBE\u6211\u4EEC\u6709\u79CD\u573A\u666F\u9700\u8981\u5E26\u6709\u65F6\u95F4\u7684\u65E5\u671F\u8303\u56F4\u9009\u62E9\uFF0C\u6BD4\u5982 ",paraId:13,tocIndex:5},{value:"2024-01-01 09:00:00",paraId:13,tocIndex:5},{value:" ~ ",paraId:13,tocIndex:5},{value:"2024-01-02 17:00:00",paraId:13,tocIndex:5},{value:"\uFF0C\u90A3\u4E48\u6211\u4EEC\u53EF\u4EE5\u8FD9\u6837\u505A\uFF1A",paraId:13,tocIndex:5},{value:"const disabledDate = (date, info) => {\n if (info.type === 'date') {\n return date.isBefore('2024-01-01', 'day') || date.isAfter('2024-01-02', 'day');\n }\n return !date.isSame('2024-01-01', info.type);\n};\n\nconst disabledTime = (date) => {\n if (date.isSame('2024-01-01', 'day')) {\n return {\n disabledHours: () => Array.from({ length: 24 }, (_, i) => i).filter((hour) => hour < 9),\n };\n }\n\n if (date.isSame('2024-01-02', 'day')) {\n return {\n disabledHours: () => Array.from({ length: 24 }, (_, i) => i).filter((hour) => hour > 17),\n };\n }\n\n // \u53EA\u9700\u8981\u8003\u8651\u5F00\u59CB\u548C\u7ED3\u675F\u65F6\u95F4\uFF0C\u8303\u56F4\u5916\u7684\u672C\u8EAB\u5DF2\u7ECF\u88AB `disabledDate` \u7981\u7528\u4E86\n return {};\n};\n",paraId:14,tocIndex:5},{value:"\u901A\u8FC7 ",paraId:15,tocIndex:6},{value:"disabledDate",paraId:15,tocIndex:6},{value:" \u548C ",paraId:15,tocIndex:6},{value:"disabledTime",paraId:15,tocIndex:6},{value:"\uFF0C\u6211\u4EEC\u53EF\u4EE5\u5BF9\u65E5\u671F\u548C\u65F6\u95F4\u8FDB\u884C\u66F4\u7EC6\u7C92\u5EA6\u7684\u63A7\u5236\uFF0C\u4EE5\u5B9E\u73B0\u4E0D\u540C\u7684\u4E1A\u52A1\u9700\u6C42\u3002\u901A\u8FC7\u4EE5\u4E0A\u793A\u4F8B\uFF0C\u76F8\u4FE1\u4F60\u5DF2\u7ECF\u5BF9\u8FD9\u4E24\u4E2A API \u6709\u4E86\u66F4\u6DF1\u5165\u7684\u4E86\u89E3\u3002\u5728\u5B9E\u9645\u4E1A\u52A1\u4E2D\uFF0C\u4F60\u53EF\u4EE5\u6839\u636E\u5177\u4F53\u9700\u6C42\uFF0C\u7ED3\u5408\u8FD9\u4E24\u4E2A API \u6765\u5B9E\u73B0\u66F4\u591A\u7684\u529F\u80FD\u3002",paraId:15,tocIndex:6}];}}]); |