ejtimepicker knockout

<html>
<head>
    <title>Essential Studio for JavaScript : Timepicker Knockout</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" charset="utf-8" />
    <!-- Style sheet for default theme (flat azure) -->
    <link href="http://cdn.syncfusion.com/18.1.0.42/js/web/flat-azure/ej.web.all.min.css" rel="stylesheet" />
    <!--scripts-->
    <script src="http://cdn.syncfusion.com/js/assets/external/jquery-1.10.2.min.js"></script>
    <script src="http://cdn.syncfusion.com/js/assets/external/knockout.min.js"></script>
    <script src="http://cdn.syncfusion.com/18.1.0.42/js/web/ej.web.all.min.js"></script>
    <script src="http://cdn.syncfusion.com/18.1.0.42/js/common/ej.unobtrusive.min.js"></script>
    <script src="http://cdn.syncfusion.com/18.1.0.42/js/common/ej.widget.ko.min.js"></script>
    <!--Add custom scripts here -->
</head>
<body>
    <div class="content-container-fluid">
        <div class="row">
            <div class="cols-sample-area">
                <div class="frame">
                    <div class="control" style="width: 136px;">
                        <label style="width: 130px;">Select Show Time </label>
                        <input id="time" type="text" data-bind="ejTimePicker:{value:timePickerValue }" />
                    </div>
                </div>
            </div>
            <div id="sampleProperties">
                <div class="prop-grid">
                    <div class="row">
                        <div class="col-md-3">Time Value</div>
                        <div class="col-md-3">
                            <input type="text" id="timeValue" class="input ejinputtext" value="" data-bind="value: timePickerValue" />
                        </div>
                        <div class="col-md-3">Selected time</div>
                        <div class="col-md-3">
                            <input type="button" class="e-btn inputBtn" id="getTime" value="Get Time" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        window.viewModel = {
            //timepicker
            timePickerValue: ko.observable("11:30 AM")
        }
        $(function () {
            // declaration
            ko.applyBindings(viewModel);
            var timeObj = $('#time').data("ejTimePicker");
            $("#getTime").click(function () {
                alert("Selected time is : " + timeObj.getValue());
            });
            $("#sampleProperties").ejPropertiesPanel();
        });
    </script>
    <style>
        .col-md-3 {
            padding-bottom: 5px;
        }

        .cols-sample-area {
            width: 200px;
            height: 80px;
            float: left;
        }
    </style>
</body>
</html>

Are there any code examples left?
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source