Skip to content
This repository was archived by the owner on Jul 28, 2024. It is now read-only.

Conversation

@tatinacher
Copy link
Member

  • Write description and API
  • Start implementing DatePicker component

@tatinacher
Copy link
Member Author

tatinacher commented Jul 21, 2021

По этому ПР прошу поглядеть описание, API и возможную реализацию (на данный момент компонент не реализован полностью), докинуть если чего не хватает.
DatePicker пока без range

"dependencies": {
"@use-date-input/core": "^0.2.1-beta.0",
"@use-date-input/dayjs-adapter": "^0.2.0-beta.0",
"dayjs": "^1.10.6",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: кайфовая либа)

format = 'DD.MM.YYYY',
icon,
initialDate = dayjs().format('DD.MM.YYYY'),
isOpen = false,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Если это передается просто без хендлера, стоит наверное назвать как-то вроде defaultOpen / initialOpen, или добавить хендлер по типу onOpenChange. Мб еще можно в зависимости от того, передали снаружи isOpen и onOpenChange, использовать или их, или локальный isOpen

Copy link
Contributor

@ainursharaev ainursharaev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Посмотри комментарии @risenforces

@tatinacher tatinacher force-pushed the feat/FRNT-570-implement-date-picker branch 2 times, most recently from 4461068 to e5d4f70 Compare August 11, 2021 14:45
@@ -0,0 +1 @@
export { DatePicker } from './date-picker';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question(blocking): Должен ли он находиться в этом пакете? Я думаю что стоит его переместить в пакет calendar, вынес этот вопрос на обсуждение

@@ -0,0 +1,165 @@
import 'react-calendar/dist/Calendar.css';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в пакете calendar должно лежать)

isDayDisabled?: ((props: CalendarTileProperties) => boolean) | undefined;
isOpen?: boolean;
locale?: string;
maxDate?: dayjs.Dayjs;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Может обычный Date принимать во всех пропах или строку? А то получается что пользователю нужен пикер, а ему еще dayjs для этого импортировать, при том что он скорее нам внутри пикера нужен чем ему

@sergeysova sergeysova requested review from risenxxx and removed request for Irinaristova August 30, 2021 08:47
sergeysova
sergeysova previously approved these changes Sep 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants