Metro-UI-CSS icon indicating copy to clipboard operation
Metro-UI-CSS copied to clipboard

Calendar picker does not show icons properly

Open petrjahoda opened this issue 6 months ago • 13 comments
trafficstars

Describe the bug Calendar picker is not showing icons for left and right in month and year.

To Reproduce No need to reproduce, it is visible in pandora https://panda.metroui.org.ua/ui/calendar

Expected behavior Show icons.

Screenshots Image

Desktop (please complete the following information):

  • OS: macOS
  • Browser Safari
  • Metro Version 5.1.2

Smartphone (please complete the following information):

  • None

Additional context

petrjahoda avatar May 17 '25 08:05 petrjahoda

Image

olton avatar May 17 '25 08:05 olton

Maybe it doesn't show in Safari, unfortunately I don't have Safari to check.

olton avatar May 17 '25 08:05 olton

OK, looks like the problem is with macOS, even Chrome shows it without those "left" and "right" arrows.

petrjahoda avatar May 17 '25 08:05 petrjahoda

as a temporary solution, you can set the icons yourself with attributes: data-prev-month-icon, data-next-month-icon, data-prev-year-icon, data-next-year-icon

<div data-role="calendar" data-prev-month-icon="..." ...>
</div>

olton avatar May 17 '25 08:05 olton

Going to do it, iOS the same.

petrjahoda avatar May 17 '25 08:05 petrjahoda

Also, you can change default font for these buttons:

.calendar-content {
    .calendar-toolbar {
        .prev-month, .prev-year, .next-month, .next-year, .next-year-group, .prev-year-group {
            forn-family: '...';
        }
    }
}

olton avatar May 17 '25 08:05 olton

Doing this <input id="date-from" data-role="calendar-picker" data-value="{{.DateFrom}}" data-prev-month-icon="<" data-next-month-icon=">"> does nothing, still the same

petrjahoda avatar May 17 '25 08:05 petrjahoda

It is calendar picker, not a calendar, maybe that is the problem with me?

petrjahoda avatar May 17 '25 08:05 petrjahoda

calendar-picker uses the calendar component

olton avatar May 17 '25 08:05 olton

now I will add the ability to change the arrows in calenda-picker

olton avatar May 17 '25 09:05 olton

For best communication, please connect to Metro UI Discord https://discord.gg/CGPFgDFS

olton avatar May 17 '25 09:05 olton

I added possibility to change arrows in calendar-picker in dev branch, If you are using a CDN, wait for the network to update.

olton avatar May 17 '25 09:05 olton

Thank you very much, will use discord next time. Have a nice day.

petrjahoda avatar May 17 '25 09:05 petrjahoda