rome icon indicating copy to clipboard operation
rome copied to clipboard

Disabled attribute is not being applied to the dom for the back or next buttons.

Open AntiFish03 opened this issue 9 years ago • 8 comments

I saw this in the css

.rd-back[disabled],
.rd-next[disabled] {
  cursor: default;
}

but I have noticed that disabled never gets added as an attribute to the button.

AntiFish03 avatar Aug 27 '15 21:08 AntiFish03

https://github.com/bevacqua/rome/blob/fb6203fe9675a5d7648ecf2fff192162c8b05a59/src/calendar.js#L491-L492

bevacqua avatar Aug 27 '15 21:08 bevacqua

rome-no disabled-code rome-no disabled

I am not seeing the back button ever receive the disabled attribute on the dom, the JS is working correctly as far as not allowing the navigation back but I am not able to style a disabled state. So let me update the issues title with disabled attribute is not appearing on the dom.

AntiFish03 avatar Aug 27 '15 21:08 AntiFish03

Well yes if you don't disable any dates the back button won't be disabled

bevacqua avatar Aug 27 '15 22:08 bevacqua

My min date is set as today... does that not disable previous dates?

AntiFish03 avatar Aug 27 '15 22:08 AntiFish03

Yes, it should

screen shot 2015-08-27 at 19 45 32

bevacqua avatar Aug 27 '15 22:08 bevacqua

Ok so my options for that picker the ele is a generic element.

cal = rome(ele, {
  monthsInCalendar: 2
  , time: false
  , min: moment(new Date().setHours(0,0,0,0))
  , inputFormat: 'MM/DD/YYYY'
});

And I am never getting the disabled attribute. The JS prevents the navigation to the previous month but never sets the attribute.

AntiFish03 avatar Aug 27 '15 22:08 AntiFish03

if you want it I created a code pen http://codepen.io/anon/pen/PPYJrm

AntiFish03 avatar Aug 27 '15 23:08 AntiFish03

@bevacqua, I was curious if you have had the opportunity, look into this?

AntiFish03 avatar Jan 23 '16 05:01 AntiFish03