Location: PHPKode > scripts > Sigma visual ajax UI builder > sigma-visual-ajax-ui-builder/Samples/linb/time/TimeRange.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta name="keywords" content="javascript framework, RIA, SPA, client SOA, linb, jsLinb, RAD, IDE, Web IDE, widgets, javascript OOP, opensource, open-source, Ajax, cross-browser, prototype, web2.0, platform-independent, language-independent" />
    <meta name="description" content="Web application powered by LINB framework" />
    <meta name="copyright" content="hide@address.com" />
    <meta http-equiv="imagetoolbar" content="no" />
    <title>jsLinb Sample</title>
</head>
    <body>
        <script type="text/javascript" src="../../../runtime/jsLinb/js/linb-all.js"></script>
        <script type="text/javascript" src="../../../runtime/jsLinb/js/Com/TimeSpan.js"></script>
        <script type="text/javascript">

            var timespan=new linb.Com.TimeSpan();

            timespan.taskTitle='task title';
            //set 'tile label' property(string)
            timespan.txtInfo='title';
            //set 'time from label' property(string)
            timespan.txtFrom='From';
            //set 'time to label' property(string)
            timespan.txtTo='To';
            //set 'timezone label' property(string)
            timespan.txtTZ='timezone';

            //set default time zone
            timespan.timezone='+0800';
            //set big time limited range
            timespan.timeStart="2008-01-16T00:00Z";
            timespan.timeEnd="2008-02-16T00:00Z";
            //set small time limited range
            timespan.timeMinUnit='h';
            timespan.timeMinCount=2;
            timespan.timeMaxUnit='ww';
            timespan.timeMaxCount=1;

            //default time range(output values)
            timespan.iniFrom='2008-01-16T08:00Z';
            timespan.iniTo='2008-01-17T08:00Z';

            timespan.onIniTimeLine=function(timeline){
                //this will show zoomin/zoomout buttons
                timeline.setTimeSpanKey('1 d');
            };

            timespan.show(document.body);
        </script>

        <button style='position:absolute;left:50px;top:260px' onclick='linb.reLang("en")'>English</button>
        <button style='position:absolute;left:150px;top:260px' onclick='linb.reLang("cn")'>Chinese</button>
        <button style='position:absolute;left:250px;top:260px' onclick='alert(window.timespan.getValue())'>get time range</button>




</body>
</html>
Return current item: Sigma visual ajax UI builder