Trendyol / baklava

Baklava is a design system provided by Trendyol to create a consistent UI/UX for app users.
https://baklava.design/
MIT License
1.24k stars 112 forks source link

[Component]: Calendar component #795

Closed dilandoogan closed 3 weeks ago

dilandoogan commented 5 months ago

Figma Design Document

https://www.figma.com/file/RrcLH0mWpIUy4vwuTlDeKN/Baklava-Design-Guide?type=design&node-id=118-3469&mode=design&t=QqSZY4PDQY4PYWXh-0

General Usage Example

<bl-calendar></bl-calendar>

Rules

Attributes

Attribute Description Default Value
type(string) Enables to select dates single, multiple or range single
min-date(Date,string) All dates before the given date will be disabled null
max-date(Date,string) All dates after the given date will be disabled null
value (Date,Date[]) Initially selected date null
start-of-week (number) number 0-6, 0 – Sunday, 6 – Saturday, defaults to 1 – Monday 1
allowDeselect (boolean) Determines whether user can deselect the date by clicking on selected item, applicable only when range-picker="false" false
disabledDates (Date,Date[]) Defines disabled dates null

Events

Event Description Return Value
bl-calendar-change Event will pass selected date to the parent component Date,Date[]

References

https://mantine.dev/dates/date-picker/ https://github.com/Hacker0x01/react-datepicker https://mui.com/x/react-date-pickers/date-time-picker/

fatihhayri commented 5 months ago

Rules section "It will have two mode such as single and range." but type "Enables to select dates single, multiple or range"

ozkersemih commented 5 months ago

In rules, there is User can define locale string to change language of the calendar sentence. So, I thought there might be a property like locale or something like that to set language.

erbilnas commented 5 months ago

In rules, there is User can define locale string to change language of the calendar sentence. So, I thought there might be a property like locale or something like that to set language.

As far as I recall, we discussed using our localization module for this purpose. We shouldn’t need to retrieve any additional properties for it.