toga icon indicating copy to clipboard operation
toga copied to clipboard

A Calendar Widget for Extended Date Inputs

Open johnzhou721 opened this issue 4 months ago • 5 comments

What is the problem or limitation you are having?

Right now all date inputs are field-like; add Calendar to display a full calendar for picking dates.

Describe the solution you'd like

A new interface for abstracting calendar views. Wrap these native APIs:

macOS: Style set to https://developer.apple.com/documentation/appkit/nsdatepicker/style/clockandcalendar?language=objc

iOS: https://developer.apple.com/documentation/uikit/uicalendarview?language=objc

GTK: Gtk.Calendar

Winforms: https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.monthcalendar?view=windowsdesktop-9.0

Android: https://developer.android.com/reference/android/widget/CalendarView

After that, replace the current large GTK date picker implementation with a TextInput or maybe two or three or other stuff.

Describe alternatives you've considered

Status quo, but we don't have large inline calendars to pick from then

Additional context

No response

johnzhou721 avatar Aug 31 '25 16:08 johnzhou721

Worth noting that UICalendarView is only available on iOS 16+. That's not a complete dealbreaker, but it would need to be flagged in the docs.

freakboy3742 avatar Aug 31 '25 23:08 freakboy3742

@freakboy3742 Yep, let's flag it but when Toga gets to 1.0 and more widespread those versions would've became pretty old anyways... no offense this is an awesome project though, I recognize there's a limited rate at which we could move forward b/c only so many people on the core team :)

johnzhou721 avatar Aug 31 '25 23:08 johnzhou721

Why would this be any different to any other the other widgets where we flag version problems or system library dependencies?

freakboy3742 avatar Sep 01 '25 00:09 freakboy3742

@freakboy3742 not really... I was just suggesting the OS versions move fast like quickly, so I was suggesting that in the ultimate long term most people would be on iOS 16. Sorry for the noise.

johnzhou721 avatar Sep 01 '25 00:09 johnzhou721

FWIW -- https://developer.apple.com/documentation/uikit/uidatepickerstyle/inline?language=objc is available for iOS 14+ -- didn't look at it cause of vague docs. It actually works!

johnzhou721 avatar Sep 06 '25 03:09 johnzhou721