Graph-Controls icon indicating copy to clipboard operation
Graph-Controls copied to clipboard

Custom CalendarView

Open 0pd opened this issue 9 years ago • 25 comments

Default CalendarView lacks range selection feature which is a common calendar use case.

This feature requires new appearance settings like border cell and middle cell styles so it can't be attached to default control in a simple manner.

Discuss.

0pd avatar Oct 31 '16 21:10 0pd

Are you thinking something that opens a view with three months viewable at once and allowing the user to pick the start/end dates?

skendrot avatar Oct 31 '16 23:10 skendrot

The view in general is the same.

0pd avatar Nov 01 '16 07:11 0pd

The same as? The current CalendarView? Can you provide some images of how you think this would look?

skendrot avatar Nov 01 '16 14:11 skendrot

Same as UWP CalendarView. I'm not a designer and I can't share my company's design.

Basic idea is to provide a style of selected cell (single date / period borders) and a style of cells between period borders (if the period was selected). And of course the behaviour of selection.

May be the text customization is also important, for example user may need capitalize day names (it's just a general DataTemplate for cell, may be).

0pd avatar Nov 05 '16 06:11 0pd

Like two boxes for the start and end? One box that contains both the start and the end?

skendrot avatar Nov 07 '16 17:11 skendrot

@skendrot I'm assuming @llvk is talking about something similar to this (Android implementation)

calendarselect

I think you could actually accomplish something like this with use of the CalendarView control's "black out" date functionality + some clever styling - though the implementation might be a little hairy.

jneidlinger avatar Nov 07 '16 20:11 jneidlinger

In addition to that, here's what I personally need from a CalendarView

image

Custom items on each day, custom UI on each day ("+" button on the day appears when mouse hovers).

I had to build my own custom calendar control. I would much rather use a better designed custom calendar control. The one included in UWP XAML doesn't let you do any of this.

andrewleader avatar Nov 08 '16 00:11 andrewleader

@anbare sounds like you've already built this control. Would you want to submit a PR?

skendrot avatar Nov 08 '16 02:11 skendrot

Mine doesn't follow the standard ItemTemplate and other practices that actual XAML controls follow (it's mostly custom-built for my purposes)... it might be easy for me to re-factor it, I could look into it... but I don't have a lot of free time, so if anyone else has something, I'm happy to let them submit something.

Here's some requirements that I think would allow the control to achieve everyone's goals

  • [ ] Individual CalendarMonthView control, so that if you want to display standalone months, you can (maybe you display a grid of 4 months, etc)
  • [ ] CalendarView control that consumes the CalendarMonthView
  • [ ] CalendarView supports swiping left/right to switch months
  • [ ] CalendarView supports arrows that appear when hovered allowing mouse users to switch months
  • [ ] CalendarView supports mouse scroll to switch months
  • [ ] CalendarView supports adding buttons/elements that stay fixed while scrolling (like a Go To Today button)
  • [ ] CalendarMonthView allows custom headers/UI elements to be added
  • [ ] CalendarMonthView allows overriding the weekday headers
  • [ ] CalendarMonthView allows overriding content in the days, including changing the position of where the day number is displayed, etc
  • [ ] All those CalendarMonthView options can be configured somehow from the CalendarView

andrewleader avatar Nov 09 '16 18:11 andrewleader

@anbare Great starting point for a CalendarEntry type control. This is of course different than what @llvk originally started this thread about. They would both be good additions

skendrot avatar Nov 09 '16 21:11 skendrot

@anbare up/down swipe is more evident (for mouse interaction consistency), isn't it?

0pd avatar Nov 10 '16 11:11 0pd

I added SDKCHECK label to point this discussion to XAML team ad they may be interested by this feedback

deltakosh avatar Nov 15 '16 00:11 deltakosh

@nmetulev this issue needs a SDK check :P

IbraheemOsama avatar Sep 19 '17 11:09 IbraheemOsama

This issue seems inactive. It will automatically be closed in 14 days if there is no activity.

windowstoolkitbot avatar Oct 18 '17 00:10 windowstoolkitbot

I just wanted to ask, if there are some news on this topic. I'm highly interested in a standalone calendar control - the built-in just offers far too less customization options.

gillesbergerp avatar Oct 20 '17 05:10 gillesbergerp

There is no updates, we should have a uservoice entry for this in order to gauge the need of the community. Do you mind creating one here?

nmetulev avatar Oct 21 '17 21:10 nmetulev

I just created a uservoice entry. It can be found here.

gillesbergerp avatar Oct 22 '17 11:10 gillesbergerp

Nice, time to spread the word :)

nmetulev avatar Oct 22 '17 18:10 nmetulev

This gets a little easier now with the UniformGrid control we're adding in 3.0 (PR windows-toolkit/WindowsCommunityToolkit#1975). I even made the sample app sample a simple calendar. So it could be a good starting point for someone looking into this in the future.

michael-hawker avatar Apr 15 '18 04:04 michael-hawker

Whats the current status of this issue?

lucaasrojas avatar Jun 27 '18 18:06 lucaasrojas

This could be a good candidate to open a request on the WinUI Controls repo to pull the CalendarView with improvements in there.

michael-hawker avatar Feb 15 '19 21:02 michael-hawker

I don't know if we'll go into the full depth of requirements laid out above, but we definitely are thinking of Calendar type controls for our work from the connections to the Microsoft Graph, so I see this as something we'll be thinking of more later this year.

michael-hawker avatar Oct 17 '19 17:10 michael-hawker

I actually did a small work around on the calendar view, and created a kind of custom range calendar control. Its quite basic but does the job of enabling first date and end date selection and then select the dates in between. If anyone is interested I could potentially shared the code!

Cheers!

vitor-antonio avatar Oct 30 '19 10:10 vitor-antonio

Going to move this to our Graph repo, as I believe anything we do in this area we'd also want to be integrable with the Graph.

michael-hawker avatar Mar 27 '20 17:03 michael-hawker

Hello 0pd, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

ghost avatar Mar 27 '20 17:03 ghost