mdehoog / Semantic-UI-Calendar

Calendar module for Semantic UI
MIT License
805 stars 126 forks source link

Clearing calendar causes graphical issue #69

Open dlynchcodes opened 7 years ago

dlynchcodes commented 7 years ago

I've got this calendar with some slightly custom date types and when I attempt to clear the calendars I get this odd graphical issue.

image

Here is a jsbin showing my problem: https://jsbin.com/cocimoseje/1/edit?html,js,output

I'm assuming I'm not clearing the calendars properly?

dlynchcodes commented 7 years ago

So it seems to be directly related to the Calendar icon. If you remove the calendar icon from the input field, this error does not occur.

https://jsbin.com/rijokijeza/edit?html,js,output

Edit: If you clear the calendar using the id of the calendar this issue does not occur, I have realized that $('.ui .calendar') is selecting the calendar icon to be cleared as well.

lubber-de commented 5 years ago

The main issue is a space in your selector. That searches for a sibling class calendar of ui

You used $('.ui .calendar') instead of $('.ui.calendar')

dlynchcodes commented 5 years ago

Yeah, you're right. I figured that out a long time ago and forgot to update the issue. This should be closed.