UNPKG

dhtmlx-suite

Version:

dhtmlx nodejs module

37 lines 1.14 kB
<!DOCTYPE html> <html> <head> <title>Attach to custom icon</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/> <link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/> <script src="../../../codebase/dhtmlx.js"></script> <style> #date_here { font-family: Roboto, Arial, Helvetica; font-size: 14px; color: #404040; } #calendar_icon { vertical-align: middle; cursor: pointer; } </style> <script> var myCalendar; function doOnLoad() { myCalendar = new dhtmlXCalendarObject({button: "calendar_icon"}); myCalendar.attachEvent("onClick", function(){ document.getElementById("date_here").innerHTML = myCalendar.getFormatedDate(); }); } </script> </head> <body onload="doOnLoad();"> <div style="position:relative;height:350px;"> <span><img id="calendar_icon" src="../common/calendar.png" border="0"></span> <span id="date_here">&nbsp;</span> </div> </body> </html>