Copy link to clipboard
Copied
I have a straight forward datefield control. Looks like the following:
<cfinput type="dateField" name="dt_RtDate" width="60px" id="dt_RtDate" title="Enter or select repeat date" value="" >
Now I have a javascript function that happens on a click event that I use to want to hide this control it looks similar to the following:
//Hide Repeater control
var dtRepeater = document.getElementById('dt_RtDate');
dtRepeater.style.visibility = "hidden";
this works fine, but there is a problem I notice. The textbox dissapears and this is fine, but the calendar image control IS STILL VISIBLE?!
So my question is I am not sure how to reference this control or property to make the entire thing go away. I would also then like to know the flipside of showing it too (which I am using by saying ... dtRepeater.style.visibility = ""; )
So what do I have to do to reference the coldfusion date control to make it dissapear completely?
Thanks,
Copy link to clipboard
Copied
You could always put it inside a span or div and do your show/hide on that element.
Copy link to clipboard
Copied
yup that makes sense did that instead thanks.