compnerd/swift-win32

DatePicker doesn't have get value property.

sutefu23 opened this issue · 4 comments

Thank you for splendid library.
DatePicker doesn't have get value property.
How can I get that value ??

Thank you.

Thank you for splendid library.

You're welcome :)

DatePicker doesn't have get value property.
How can I get that value ??

Ah, right, that hasn't been implemented yet. I would be happy to entertain patches to add var date: Date { get set } to the control. Otherwise, I might be able to get to that in a few days.

Turns out that this is a bit more complicated than I anticipated. Mostly that translates to the values that are returned might be slightly incorrect, but I'd appreciate any actual issues that are identified. The complexity is entirely in the time representations.

I'm not as convinced of my quick and dirty approach to get the conversions between SYSTEMTIME, FILETIME, TimeInterval, and Date to be entirely satisfied. Tests to improve that validation would be welcome.

I'm not entirely certain how to represent the Date when the DatePicker is configured for selecting a date only (i.e. what do we encode the time to?). This should at least give us the fundamentals to start making progress towards that goal. I am hoping to have the necessary changes for this merged later today.

Hi. Saleem.
I really really appliciate for your strong support.
Yes, I will fork this repo and if I can, I will try to make patches.
Thank you.

Great! The support for the date property has been merged. You should be able to find examples in the tests and documentation should cover the interface as well.