wireui / wireui

TallStack UI components
https://v1.wireui.dev
MIT License
1.37k stars 166 forks source link

Jalali datepicker #76

Closed aliqasemzadeh closed 6 months ago

aliqasemzadeh commented 2 years ago

I want to have jalali datepicker I find out you use dayjs for datepicker. We have dayjs-jalali how can I use it for datepicker? https://www.npmjs.com/package/dayjs-jalali

PH7-Jack commented 2 years ago

Hello @alighasemzadeh

I will create an integration for it

PH7-Jack commented 2 years ago

In now is not possible to use without rebuild assets manually

aliqasemzadeh commented 2 years ago

@PH7-Jack Guide me t do it.

PH7-Jack commented 2 years ago

For now, the unique way to do it is by creating a fork

Add a new line to extends dayjs-jalali https://github.com/PH7-Jack/wireui/blob/master/ts/utils/date.ts#L9

aliqasemzadeh commented 2 years ago

@PH7-Jack I want to have jalali datepicker something like : http://babakhani.github.io/PersianWebToolkit/doc/datepicker/example/

Is it possible with that replacement?

PH7-Jack commented 2 years ago

In the published view file, you can translate all names of days, months...

aliqasemzadeh commented 2 years ago

@PH7-Jack My Test: https://noyan.cloud/test Repo: https://github.com/alighasemzadeh/noyan.cloud My Package:https://github.com/alighasemzadeh/wireui

I rebuild all assets but it doesn't work. Where should I add { jalali: true }

PH7-Jack commented 2 years ago

I don't know how to add Jalali, but I will search for it

aliqasemzadeh commented 2 years ago

I did it. Just I have some problem: 1-Year not pass when click on date. (This might be problem of datepicker) 2-Set first day of week is important

PH7-Jack commented 2 years ago

I will have news about this soon. At the moment it is not possible

aliqasemzadeh commented 2 years ago

@PH7-Jack https://github.com/zoomit-org/Dayjs-Jalali-Plugin I found new jallali date for Persian language.

import jalaliPlugin from '@zoomit/dayjs-jalali-plugin'

dayjs.extend(jalaliPlugin)
dayjs.extend(utc)
dayjs.extend(timezone)
dayjs.extend(customParseFormat)
dayjs.extend(localizedFormat)
dayjs.calendar('jalali')

It display wrong dates.

phaiderh commented 2 years ago

Hello @PH7-Jack

Thanks for this amazing package. Can you add Hijri calendar as well in the datepicker input? :)

aliqasemzadeh commented 2 years ago

@PH7-Jack Any news about Jalali datepicker?

PH7-Jack commented 2 years ago

@alighasemzadeh for now, i don't have any news, sorry

aliqasemzadeh commented 1 year ago

@PH7-Jack Any news about using Jalali?

PH7-Jack commented 1 year ago

@alighasemzadeh Unfortunately no, I'm planning it to the new release 2.x with the RTL support

joaopalopes24 commented 6 months ago

There are no plans to implement this solution. We are updating the status of the Issues and if you want to contribute to this solution, it's welcome.

aliqasemzadeh commented 3 months ago

@PH7-Jack @joaopalopes24 https://github.com/shalior/filament-persian-date-field

Hi I think we can add this field to wireui.