SAP / fundamental-ngx

Fundamental Library for Angular is SAP Design System Angular component library
https://sap.github.io/fundamental-ngx
Apache License 2.0
269 stars 129 forks source link

display calendar legend #12403

Open egorwow70 opened 2 months ago

egorwow70 commented 2 months ago

Is this a bug, enhancement, or feature request?

bug

Describe your proposal.

Hello, fundamental-ngx team. We are implementing the app using angular and fundamental-ngx/core and have a requirement to display a date picker with special dates and legend displayed. As I can see, special dates can be displayed with current library functionality, but the legend is missing. Is it possible to fix it on the library side?

Legend should be supported by both fd-calendar and fd-date-picker from fundamental-ngx/core

As for the technical side, I think it will be easy for devs, who are using the lib, to configure that via those objects (SpecialDayRule), for example via new field - title or label or legendLabel (naming up to you):

image

I am not a designer, but this is an example what we need: image

Sapui5 example - https://sapui5.hana.ondemand.com/#/entity/sap.ui.unified.Calendar/sample/sap.ui.unified.sample.CalendarSpecialDaysLegend

Can you handle that on the application side

No.

Which versions of Angular and Fundamental Library for Angular are affected? Please, specify the exact version. (If this is a feature request, use current version.)

Did you check the documentation and the API?

Yes.

Did you search for similar issues?

Yes

droshev commented 2 months ago

@egorwow70 what you refer to ui5 is the calendar components, not the datepicker. We have the same for datepicker - https://fundamental-ngx.netlify.app/#/core/calendar

egorwow70 commented 2 months ago

@droshev

Thanks for the reply, I assume, that the date-picker control uses calendar control according to the library repo source files - https://github.com/SAP/fundamental-ngx/blob/a9d0906f5907a1bc8eb416dd3e01cc8c33e7c470/libs/core/date-picker/date-picker.component.html#L70

And I don't find any legend configuration here, as well in the SpecialDayRule interface: image

So, it seems it would be great to have it inside both calendar and date picker, because the second one uses the first one

droshev commented 2 months ago

@droshev

Thanks for the reply, I assume, that the date-picker control uses calendar control according to the library repo source files -

https://github.com/SAP/fundamental-ngx/blob/a9d0906f5907a1bc8eb416dd3e01cc8c33e7c470/libs/core/date-picker/date-picker.component.html#L70

And I don't find any legend configuration here, as well in the SpecialDayRule interface: image

So, it seems it would be great to have it inside both calendar and date picker, because the second one uses the first one

Let me bring this with the designers first.

droshev commented 2 months ago

@egorwow70 we have the feature for special days, we just need to display them in the calendar (respectively in datepicker and datetimepicker)

droshev commented 1 month ago

@alexhristov14 Can you check whether we need to implement this in styles first and then bring it in ngx?