Dorababu Meka

Dorababu Meka

  • 226
  • 8.3k
  • 1.7m

DOJO calendar for Text box on image clickin asp.net

Jun 7 2011 8:59 AM
How to have a DOJO calendar for a Text box control on clicking the image next to text box in asp.net. The general examples i find are for on Form load or for a DIV but i would like to have it as per my requirement
This is what i have written from searching google
<html dir="ltr">
<head>
    <style type="text/css">
            body, html { font-family:helvetica,arial,sans-serif; font-size:90%; }
        </style>

    <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js" djconfig="parseOnLoad: true">
    </script>

    <script type="text/javascript">
            dojo.require("dijit.form.DateTextBox");
            function setShortYear() {
                var w = dijit.byId('shortYear');
                w.constraints.fullYear = false;
                w.attr('value', w.attr('value')); // reformat display to short year
            }
            dojo.addOnLoad(setShortYear);
    </script>

    <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dijit/themes/claro/claro.css" />
</head>
<body class=" claro ">
    <label for="shortYear">
        From:
    </label>
    <input id="shortYear" type="text" name="shortYear" dojotype="dijit.form.DateTextBox"
        required="true" />
    <!-- NOTE: the following script tag is not intended for usage in real
        world!! it is part of the CodeGlass and you should just remove it when
        you use the code -->

    <script type="text/javascript">
            dojo.addOnLoad(function() {
                if (document.pub) {
                    document.pub();
                }
            });
    </script>

</body>
</html>
Can any one change this as per my requirement


Answers (1)