nazar-pc / PickMeUp

Really simple, powerful, customizable and lightweight standalone datepicker
BSD Zero Clause License
615 stars 191 forks source link

Week View #92

Closed innertrends closed 8 years ago

innertrends commented 9 years ago

There are 3 views supported so far: days/months/years

Would it be possible to support weeks as well?

@EHLOVader can you take a look? This issue is follow up to your suggestion on #79

Thank you, Claudiu

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

nazar-pc commented 9 years ago

I'm not sure it will be implemented. It is completely different layout and I do not think it would be useful for many people. However, I'm open for suggestions and pull requests. If it will not make things too much complex - I'll be happy to acceps such PR.

innertrends commented 9 years ago

We were thinking of not changing the layout of day (or just minor changes) but only the behavior. When a user hovers, the whole week is highlighted and when he clicks, the whole week is selected.

nazar-pc commented 9 years ago

This might be achieved even with current implementation if you'll add few event handlers and a bit of styles.

innertrends commented 9 years ago

Will give it a try. I played before with event handlers but I felt that this might be a bit more complex.

EHLOVader commented 9 years ago

What would the desired output be?

Week number, still day chosen, or a date range, from Sunday to Saturday. or whatever the first day of week is configured to.

Also regardless of the above answer would you want week numbers displayed to the left of the week. Like some datepickers do.

Image of datepicker

innertrends commented 9 years ago

Thanks for jumping in. Week numbers displayed would be nice to have (great to have) and it's the only design change I had in mind.

The desired outcome would be this:

I think that covers pretty much everything and should provide a good user experience.

innertrends commented 9 years ago

I managed to implement weekly selection based on current options: http://codepen.io/padicode/pen/xwVNvR

There seems to be a small error (render error?) after any date selection: the hover function doesn't work anymore on the third calendar, while it works on the first 2 ones. Seems strange.

nazar-pc commented 8 years ago

It works for me in all three in both Firefox Nightly and Chromium stable.

innertrends commented 8 years ago

I also tried with Chromium and Firefox and it does not work in the following scenario:

  1. Hover anywhere on the calendar, from July to September, and the week is highlighted, works OK
  2. Select any dates from August, works OK
  3. Hover anywhere in July or August: the week is highlighted, works OK
  4. Hover anywhere in September: the week is not highlighted anymore, NOT working

Thank you, Claudiu

nazar-pc commented 8 years ago

It was a minor jQuery mistake, nothing about PickMeUp: https://codepen.io/anon/pen/WxVmXo As it can be achieved with current implementation I'm closing this issue.