jQuery UI Widgets Forums Editors DateTimeInput Time section of DateTime

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 12 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Time section of DateTime #5560

    shadizar
    Member

    Hello, I am wondering if I can use the datetime element to select both the date and the time of say an ‘event’. If there is no such functionality to this element what do you recommend, a MaskedInputField or a NumericInputField?

    Thank you.

    Time section of DateTime #5566

    Peter Stoev
    Keymaster

    Hi shadizar,

    To format time section, you need to specify the jqxDateTimeInput’s formatString property to point to a format which includes the Time section.

    For example:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title id='Description'>In this demo is illustrated how to use the jqxDateTimeInput to edit date and time.</title>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="../../scripts/gettheme.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxdatetimeinput.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcalendar.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxtooltip.js"></script>
    <script type="text/javascript" src="../../jqwidgets/globalization/jquery.global.js"></script>
    </head>
    <body>
    <div id='content'>
    <script type="text/javascript">
    $(document).ready(function () {
    var theme = getTheme();
    // Create a jqxDateTimeInput
    $("#jqxWidget").jqxDateTimeInput({ width: '300px', height: '25px', theme: theme, formatString: 'F' });
    });
    </script>
    <div id='jqxWidget'>
    </div>
    </div>
    </body>
    </html>

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.