javascript - Using dijit.byId to get dijit.form.DateTextBox value -
inside alert(invalid date) coming , please tell me how can date value
<html> <head> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css"/> <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js" djconfig="parseonload: true"> </script> <script> dojo.require("dijit.form.datetextbox"); </script> <script> function callme() { var val = dijit.byid('fromdate_out').value; alert(val); } </script> </head> <body class="claro"> <div dojotype="dijit.form.datetextbox" require="true" id="fromdate_out" placeholder="from date" onchange="dijit.byid('fromdate').constraints.max =arguments[0];" ></div> <input type="button" onclick="callme()"/> </body> </html>
the proper way properties dijits use get
. try changing callme
following:
function callme() { var val = dijit.byid('fromdate_out').get("value"); alert(val); }
Comments
Post a Comment