Skip to main content
12 events
when toggle format what by license comment
Aug 2, 2017 at 13:23 history rollback Cátia Matos
Rollback to Revision 1
Aug 2, 2017 at 13:03 history edited VincenzoC CC BY-SA 3.0
Improved formatting
Aug 2, 2017 at 11:57 comment added Cátia Matos My code is too extensive and i have a function to get that but here it doesnt work.. but here it is plnkr.co/edit/Kqfddy5Y4t3SVww8zjcr?p=catalogue (I have a simplified version and a full version with all my controller)
Aug 2, 2017 at 11:50 comment added AlexanderT Could you add jsfiddle?
Aug 2, 2017 at 11:48 comment added Cátia Matos BUt it must jsut be triggered when i selected custom option... and if i remoe it datepicker atribution will raise the error "cannot read property getAttribute of null
Aug 2, 2017 at 11:45 comment added AlexanderT So if you remove condition if(rangeSelector.value == 'custom') alert is shown?
Aug 2, 2017 at 11:44 history edited Cátia Matos CC BY-SA 3.0
added 240 characters in body
Aug 2, 2017 at 11:43 comment added Cátia Matos document.getElementsByTagName('button')[0] <button class=​"applyBtn btn btn-small btn-sm btn-success" type=​"button">​Apply​</button>​ Is rendered... see my updated question with logs
Aug 2, 2017 at 11:39 comment added AlexanderT console.log (document.getElemenstByTagName("button")[0] ) what it gives? Does it undefined or button has been found? if button doesn't rendered, not in DOM at the time you bind handler, it will not work. So you need check if it is there before binding, or you can try [delegate] (api.jquery.com/delegate) even though it deprecated, for testing you could use it and see if alert called.
Aug 2, 2017 at 11:33 comment added Cátia Matos Dont understand your comment sorry... I'm new at this..
Aug 2, 2017 at 11:30 comment added AlexanderT I suspect that document.getElemenstByTagName("button")[0] is undefined, e.g. not rendered yet, try to delegate event to that button, but better to wrap your picker in directive and use pickers api
Aug 2, 2017 at 11:22 history asked Cátia Matos CC BY-SA 3.0