farshaddavoudi / Blazor.PersianDatePicker

A Jalali (Persian) and Gregorian (Miladi) dual datepicker library for Blazor applications
MIT License
64 stars 13 forks source link

چرا استرینگ #48

Open Mahdihp opened 2 years ago

Mahdihp commented 2 years ago

برای برای باند کردن مقدار تاریخ از رشته استفاده کردید من مقایرم DateTime هست

farshaddavoudi commented 1 year ago

سلام وقت بخیر معمولا ما پراپرتی بایند تاریخ مخصوصا تاریخ شمسی رو استرینگ می‌گیریم و موقع فرستادن به بک اند یا تو خود بک اند به DateTime تبدیلش می‌کنیم. ولی چیزی که شما می‌فرمایید هم ولیده روی این مورد کار می‌کنم که بتونه مستقیم به DateTime بایند بشه.

EsmaeelAmarloo commented 11 months ago

سلام لطفا dateonly رو هم در نظر بگیرید

farshaddavoudi commented 11 months ago

Thanks @EsmaeelAmarloo

It's been like a long-time wish and I cannot ignore it anymore!

I will take a serious look at this after the #77 issue (OnChange in EditForm not working) is addressed

farshaddavoudi commented 11 months ago

@EsmaeelAmarloo I've tried for a couple of hours to make it work but unfortunately, there is not any easy solution for this as it needs a complete refactor and new implementation to make the component generic and address the issue which is not possible at the moment considering my limited time. I keep this issue open so that maybe in the future, I can work on it and finally make it generic. Of course, any contribution is welcome as well. Having said that, it's not a breaking change or something that prevents you from using the library and you can use the datepicker in its current state without any problem. Maybe the only drawback is manually converting of string date to a DateTime or DateOnly date to talk to your backend.