Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Disabling CF9 HTML datefield 'calendar icon'

New Here ,
Sep 09, 2010 Sep 09, 2010

Hey guys... i'm trying to disable a <cfinput type="datefield"> with javascript, of course i'm working with the HTML version of this control. So far my code looks like this:

<cfform name="TestingDisable" format="html" method="post" action="#CGI.SCRIPT_NAME#">

  <cfinput type="checkbox" name="agenda" onChange="document.evt_call.agendaDate.disabled=!this.checked">

  <span style="font-family:Verdana, Geneva, sans-serif; font-size:10px;">Schedule</span>

  <br/>

  <cfinput type="datefield" firstdayofweek="1" mask="mm/dd/yyyy" name="agendaDate" value="#now()#" disabled="disabled"/>

</cfform>

If you run this code it will show you the disabled calendar until you check the "agenda" checkbox... now, if you do not put a check on the checkbox the text part of the datefield stays disabled  but you can still pick a date clicking on the minicalendar icon that is located on the right.

Is there any way to disable the minicalendar clicking action for this control?

Ty in advance!

857
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 10, 2010 Sep 10, 2010
LATEST

Bump!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources