jQuery UI Widgets Forums Editors DateTimeInput Copy & Paste date manually

This topic contains 5 replies, has 4 voices, and was last updated by  nehaC 8 years, 3 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Copy & Paste date manually #52841

    Mahadevi
    Participant

    Hello,

    I’m unable to input date manually.Is it possible to paste date into Date textbox manually without inputting DatetimePicker? Please explain..

    Regards,

    Mahadevi Kumbar

    Copy & Paste date manually #52854

    Dimitar
    Participant

    Hello Mahadevi Kumbar,

    Unfortunately, the “paste” functionality is not supported. You can, however, copy the date from the datetimeinput (enableAbsoluteSelection should be set to true to be able to select it with the mouse).

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Copy & Paste date manually #52889

    Mahadevi
    Participant

    Hi Dimitar,

    Thank you for the reply.I tried your solution but unfortunately didn’t work ,here is my code

    <div style=”margin: 10px;” id=’jqxDateTimeInput’></div>

    $(“#jqxDateTimeInput”).jqxDateTimeInput({
    width: ‘250px’,
    height: ’25px’,
    theme: ‘energyblue’,
    selectionMode: ‘none’,
    enableAbsoluteSelection :true
    });

    Please tell me any other ways to solve this problem.

    Regards,
    Mahadevi

    Copy & Paste date manually #52898

    Peter Stoev
    Keymaster

    Hi Mahadevi & Dimitar,

    In order to Input date through the Keyboard manually and to create jqxDateTimeInput, you should add the following references to your page:

    <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/jqxbuttons.js"></script>
    <script type="text/javascript" src="../../jqwidgets/globalization/globalize.js"></script>
    

    Example:

    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html lang="en">
    <head>
    <title>jQuery DateTimeInput Sample</title>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css"/>
    <script type="text/javascript" src="../../scripts/jquery-1.11.0.min.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/jqxbuttons.js"></script>
    <script type="text/javascript" src="../../jqwidgets/globalization/globalize.js"></script>
     </head>
    <body>
    <div id='content'>
      <script type="text/javascript">
          $(document).ready(function () {
              $("#jqxdatetimeinput").jqxDateTimeInput({ width: '250px', height: '25px' });
              // init buttons.
              $("#getDateButton").jqxButton();
              $("#setDateButton").jqxButton();
              // set new date.
              $("#setDateButton").click(function () {
                  var date = new Date();
                  date.setFullYear(2012, 5, 6);
                  $('#jqxdatetimeinput').jqxDateTimeInput('setDate', date);
              });
              // get date.
              $("#getDateButton").click(function () {
                  var date = $('#jqxdatetimeinput').jqxDateTimeInput('getDate');
                  alert(date);
              });
          });
      </script>  
      <div id='jqxdatetimeinput'></div>
      <div style="margin-top: 10px;">
        <input id="getDateButton" type="button" value="Get Date"/>
        <input id="setDateButton" type="button" value="Set Date"/>
      </div>
    </div>
    </body>
    </html>

    By doing that, you would be able to click on the Input field and type your Date.
    Copy is Supported by default. Select the Input field, press Ctrl+A and then Ctrl+C. Paste however is still not supported.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Copy & Paste date manually #53051

    Mahadevi
    Participant

    Hello Peter,

    I executed same code what you had posted above but still I’m not able to “Copy” the full Date text.

    Please help me to find the solutions..

    Regards,

    Mahadevi

    Copy & Paste date manually #81230

    nehaC
    Participant

    I see the paste working in chrome but not in firefox. Is it a known issue?

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

You must be logged in to reply to this topic.