igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

Need a month picker (feature request)

Open grosch opened this issue 8 years ago • 22 comments

Description

Would be very useful if the calendar component let us pick a month instead just a specific day in the month. For example, this order counts against December. I don't care about a specific date in December, I just care about the month.

It would be fine if you just picked the 1st as far as the Date() object, but for the UI the person still just sees a month.

  • igniteui-angular version: 6.2.0
  • browser: Any

grosch avatar Nov 22 '18 20:11 grosch

@grosch There's already a UI for that in the IgxCalendar. What we can do is extract it as a separate component and expose it.

I'm talking about this part of the calendar: image

kdinev avatar Nov 28 '18 11:11 kdinev

IMO it is not necessary to extract it in a component, but @grosch is asking how to change the month in the date picker, which is possible upon clicking the month name in the area just above the weekdays.

StefanIvanov avatar Nov 28 '18 12:11 StefanIvanov

@StefanIvanov The UI is there, but currently you cannot have that at the only calendar UI, which you go directly to, and can react to user choice.

kdinev avatar Nov 28 '18 13:11 kdinev

If @grosch 's goal is to be able to select only a month without a date etc. I'd argue that a dropdown component with the 12 items, one for each month, would work just fine. The idea of a date picker is that you are able to pick all parts of a date i.e. DD, MM and YY but if you have a form where you provide the month in which your yearly car insurance expires, than you wouldn't need a picker. I am curious to know about the specific scenario @grosch is facing to make a proper recommendation and if it is on our end, we will know what specific feature we are required to meet that fits right in a scenario.

StefanIvanov avatar Nov 28 '18 13:11 StefanIvanov

@StefanIvanov This would be similar concept to the time picker component. With a time picker, you only expose a specific portion of a date object to be editable by an end user, namely the time portion. A month picker would only be for the month portion of a date.

@grosch Would a drop down with months serve the purpose for you?

kdinev avatar Nov 28 '18 14:11 kdinev

@StefanIvanov The idea is that, for example, you've got an order/billing system, and you have to identify what month the order goes against, and so you're picking a year and a month, but you don't care about the day. Just having a list of month dropdowns isn't good because then you have to have a second input to type in a year.

grosch avatar Nov 28 '18 16:11 grosch

@kdinev Put a year picker at the top of that image you posted and that's exactly what I'm looking for!

grosch avatar Nov 28 '18 16:11 grosch

@grosch Like this? image

kdinev avatar Nov 28 '18 17:11 kdinev

@kdinev No, something more like this, from ng2-date-picker:

image

grosch avatar Nov 29 '18 08:11 grosch

My screenshots are from this demo: https://stackblitz.com/angular/eymadmbgxko

The stackblitz is from this sample in the docs: https://www.infragistics.com/products/ignite-ui-angular/angular/components/calendar.html#special-dates

Click on the month name or year name and you get the views. My understanding is you just don't need the days view from the whole thing.

kdinev avatar Nov 29 '18 08:11 kdinev

I suppose it could work like that. If it defaulted to just the month view, and I could click the year to get the scroller, and then going back would be the month view, that could work.

grosch avatar Nov 29 '18 16:11 grosch

@grosch We will prioritize this for one of our upcoming sprint and we will keep you posted on the progress. I think it would be rather easy to separate those views from the calendar into a separate component.

kdinev avatar Dec 04 '18 14:12 kdinev

Any ETA on a delivery date?

grosch avatar Jan 16 '19 18:01 grosch

@grosch We will assign this to a sprint and will try to get it for 7.1.3 which will be in a week or so. We wouldn't be able to get it in 7.1.2 because that's planned for tomorrow.

kdinev avatar Jan 17 '19 07:01 kdinev

@grosch we wills tart working on this in the current Sprint and will provide an ETA after the we do an internal evaluation of the time needed to complete the task.

SlavUI avatar Jan 17 '19 08:01 SlavUI

I am working on some initial designs and a draft of a specification, where they will be placed.

StefanIvanov avatar Jan 17 '19 10:01 StefanIvanov

Any update?

grosch avatar Jan 31 '19 23:01 grosch

@grosch This is in development already. It will be released with 7.2.0.

kdinev avatar Feb 01 '19 08:02 kdinev

Adding some initial draft of the calendar views specification to serve as a base for the month picker implementation.

SAndreeva avatar Feb 05 '19 08:02 SAndreeva

I still think you're missing the most common case:

As a developer I want to be able to instantiate a year and month picker, as a single control, without having to have a year selector and then another control as a month selector.

grosch avatar Feb 06 '19 02:02 grosch