Ali-Azmoud / persian_datepicker

A persian ( farsi ) datepicker for flutter.
https://pub.dartlang.org/packages/persian_datepicker
Other
68 stars 17 forks source link

Add persian number option #1

Closed DanialV closed 5 years ago

DanialV commented 5 years ago

It would be great if you create a feature for supporting Persian number in date picker because this is a Persian date picker with numbers should be in a Persian format not English.

Ali-Azmoud commented 5 years ago

Hi Yeah you're right. at first, I was up to add this feature, but later I realized it would be better if user can change the whole font of datepicker so that numbers and other parts can change to farsi or any other style,

I'm going to add this feature ( changing font ) soon, after that I will start working on on farsi numbers without changing font.

I believe 'Vazir' is a great persian font which supports Farsi numbers as well. here is the link, its free

Ali-Azmoud commented 5 years ago

in the latest version you can use farsiDigits to get persian numbers

also you can change font family by fontFamily if you have a font supports persian numbers

DanialV commented 5 years ago

great thanks so much for the awesome support By the way, I couldn't see your source code in your repo, is your library closed source I would like to contribute to it and add some cool feature in future if possible.

DanialV commented 5 years ago

I tested new version still something is missing output date which is shown in the text field is still English number I tried onChanged property in order to convert it my self however your library doesn't trigger onChanged property when the date changed.

Ali-Azmoud commented 5 years ago

I tested new version still something is missing output date which is shown in the text field is still English number I tried onChanged property in order to convert it my self however your library doesn't trigger onChanged property when the date changed.

I don't think that gonna work. Farsi numbers are not real number characters, and they don't have number functionalities. it will fail I'm sure.

also TextField's style is outside the scope of this library. It's inside the scope of your App, you can customize it to show numbers Farsi by changing it's font. real digits but in Farsi

here is an example

photo_2019-01-17_06-42-04

About the source, I forgot to upload it here. I will, tonight or tomorrow

Ali-Azmoud commented 5 years ago

You know, I'm going to give it a shot tonight. I'm sure it can be done somehow :) so I'm going to reopen this issue

Ali-Azmoud commented 5 years ago

it's done. you can now get Farsi digits inside your TextField as well

DanialV commented 5 years ago

thanks, it is awesome now and thanks again for your great support.