Home Dojo Dojo TimeSpinner



Dojo TimeSpinner
Posted on: November 1, 2008 at 12:00 AM
In this section, you will learn about the dojo TimeSpinner. This is same as the dojo NumberSpinner.

Dojo TimeSpinner

       

In this section, you will learn about the dojo TimeSpinner. This is same as the dojo NumberSpinner. But the NumberSpinner only worked on the an integer type data. That means you increase and decrease an integer number. Similarly the TimeSpinner button provides you to increase and decrease the time through the TimeSpinner button in AM and PM. If you enter before 12:00 then it displays the time in AM and after 12:00 it displays the time in PM.

Try Online: TimeSpinner

Here is the code of Program:

<html>
<head>
<title> Dojo TimeSpinner Example</title>
  <style type="text/css">
  @import "../dijit/themes/soria/soria.css";
  @import "/resources/dojo.css";
  </style>
<script type="text/javascript" src="dojo.js" djConfig="parseOnLoad: true"></script>

<script type="text/javascript">
  dojo.require("dojox.widget.TimeSpinner");
  dojo.require("dojo.parser"); // scan page for widgets

</script>
</head>
<body class="soria">
<h1>Dojo TimeSpinner Example Demo</h1>
<br>

  <input id="timeSpinner" dojoType="dojox.widget.TimeSpinner"
  value="12:30 PM"
  name="timeSpinner"
  hours="12"
  id="timeSpinner" />
</body>
</html>

Output:

When you run this program then you get:

Your inputted time is after 12:00 then you see the following output time is in PM.

Try Online:

Related Tags for Dojo TimeSpinner:
cidedatatimebuttondojoiointegertypedisplaynumbersvinumberintthisidifforworktolearneareilitdessectionsplpeimenterinasmntoutplayspinnerjispinnerafteresthroughspiasepimemeanhrprodosamesimilarsspdisplaysespbeforeatpinkincishaimellncreaandarsasimttssamssamthspin12abafhatdispplprmindonlyononl


More Tutorials from this section

Ask Questions?    Discuss: Dojo TimeSpinner  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.