You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
6.7 KiB
1 line
6.7 KiB
2 years ago
|
{"ast":null,"code":"var _jsxFileName = \"/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/src/components/DateRangePicker/index.js\",\n _s = $RefreshSig$();\n\n// it has style inside index.scss ---> // Start DateRangePicker && end DateRangePicker\nimport React, { useEffect } from \"react\";\nimport DatePicker from \"react-multi-date-picker\";\nimport \"./index.scss\";\nimport persian from \"react-date-object/calendars/persian\";\nimport persian_fa from \"react-date-object/locales/persian_fa\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nconst weekDays = [\"شنبه\", \"یکشنبه\", \"دوشنبه\", \"سشنبه\", \"چهارشنبه\", \"پنجشنبه\", \"جمعه\"];\n\nfunction CustomRangeInput(_ref) {\n _s();\n\n let {\n openCalendar,\n value\n } = _ref;\n useEffect(() => {\n openCalendar();\n }, []);\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"flex flex-row items-center justify-center mt-3\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n className: \"w-[45%] py-1 text-center text-sm rounded border border-surfaceBorder focus:outline-none focus:border-primary focus:ring-primary focus:ring-1\",\n onFocus: openCalendar,\n value: value[0],\n readOnly: true\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"p\", {\n className: \"mx-2 text-sm\",\n children: \"\\u062A\\u0627\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"input\", {\n className: \"w-[45%] py-1 text-center text-sm rounded border border-surfaceBorder focus:outline-none focus:border-primary focus:ring-primary focus:ring-1\",\n onFocus: openCalendar,\n value: value[1],\n readOnly: true\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 5\n }, this);\n}\n\n_s(CustomRangeInput, \"OD7bBpZva5O2jO+Puf00hKivP7c=\");\n\n_c = CustomRangeInput;\n\nconst DateRangePicker = () => {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"w-full rtl flex flex-col-reverse\",\n children: /*#__PURE__*/_jsxDEV(DatePicker, {\n range: true,\n className: \"flex \",\n calendar: persian,\n locale: persian_fa,\n fixMainPosition: true,\n fixRelativePosition: true,\n calendarPosition: `${\"top\"}-${\"center\"}`,\n offsetY: \"10\",\n onClose: () => false,\n arrow: false,\n minDate: new Date(),\n render: /*#__PURE__*/_jsxDEV(CustomRangeInput, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 59,\n columnNumber: 17\n }, this),\n weekDays: weekDays\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 5\n }, this);\n};\n\n_c2 = DateRangePicker;\nexport default DateRangePicker;\n\nvar _c, _c2;\n\n$RefreshReg$(_c, \"CustomRangeInput\");\n$RefreshReg$(_c2, \"DateRangePicker\");","map":{"version":3,"names":["React","useEffect","DatePicker","persian","persian_fa","weekDays","CustomRangeInput","openCalendar","value","DateRangePicker","Date"],"sources":["/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/src/components/DateRangePicker/index.js"],"sourcesContent":["// it has style inside index.scss ---> // Start DateRangePicker && end DateRangePicker\n\nimport React, { useEffect } from \"react\";\nimport DatePicker from \"react-multi-date-picker\";\nimport \"./index.scss\";\n\nimport persian from \"react-date-object/calendars/persian\";\nimport persian_fa from \"react-date-object/locales/persian_fa\";\n\nconst weekDays = [\n \"شنبه\",\n \"یکشنبه\",\n \"دوشنبه\",\n \"سشنبه\",\n \"چهارشنبه\",\n \"پنجشنبه\",\n \"جمعه
|