Setting date-time fields

rss

Posted by marcwenger - Feb 17 ’14 at 07:31

How does one set, in javascript, the date, hour and minute fields?  Are there special break characters in a string or Date object?  Thanks

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 8 years 2 months 18 days
    #1 by Dmitry Kozlov Feb 18 ’14 at 03:57

    Hello,

    You should pass an array into date and time field:

    fd.field('DateTime').value(['3/19/2014', '9 AM', '40'])
    
  • davidnarramore
    Member
    Member for: 6 years 10 months 16 days
    #2 by davidnarramore Apr 9 ’15 at 11:34

    Can the time range be set?  Instead of 24 hours 8am 8pm?

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 8 years 2 months 18 days
    #3 by Dmitry Kozlov Apr 10 ’15 at 05:47

    [#2]: Hi,

    You can change time format in the regional settings of the site:

    Site Settings -> Regional settings -> Time format.

     

  • davidnarramore
    Member
    Member for: 6 years 10 months 16 days
    #4 by davidnarramore Apr 10 ’15 at 06:06

    I am talking about the control on the list forms only showing options from 8am to 8pm. The regional settings are set from 8am to 8pm, but the date time picker still shows full 24 hour time period.

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 8 years 2 months 18 days
    #5 by Dmitry Kozlov Apr 13 ’15 at 03:51

    [#4]: Got it. You can remove redundant options with the help of JavaScript:

    fd.field('DateTime').control()._el().find('select:eq(0) > option').filter(function() { return $(this).index() < 8 || $(this).index() > 20 }).remove()

    Replace DateTime in the code above with the internal name of you date and time field.

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 8 years 2 months 18 days
    #6 by Dmitry Kozlov Apr 13 ’15 at 03:51

    [#4]: Got it. You can remove redundant options with the help of JavaScript:

    fd.field('DateTime').control()._el().find('select:eq(0) > option').filter(function() { return $(this).index() < 8 || $(this).index() > 20 }).remove()

    Replace DateTime in the code above with the internal name of you date and time field.

  • acquiro
    Member
    Member for: 1 year 6 months 14 days
    #7 by acquiro Jul 18 ’20 at 02:14
  • Oddyann
    Member
    Member for: 11 months 24 days
    #8 by Oddyann Dec 14 ’20 at 02:16

    [url=https://www.reddit.com]Thanks![/url]

  • Anstivoung
    Member
    Member for: 10 months 10 days
    #9 by Anstivoung Jan 27 ’21 at 10:34

    Hey, guys! I know for sure that many of you will be really interested in the issues about college essay writing service reviews, so please just visit this web page and you will enjoy the result!

  • davidallen02
    Member
    Member for: 10 months 9 days
    #10 by davidallen02 Jan 27 ’21 at 10:47

    Are you using the HP printer for a long time? But, you do not receive the excellent printout as you expect. Then, you do not think on this matter how to recover from technical difficulties. The help of HP support gives the right way to churn out the best outcome by removing its flaws. It is the general tendency of human-being to follow the best troubleshooting tricks to stay away from difficulties. Hence, you do not move here and there and stop your discovery on a third party professional team. The association of HP printer support executive helps you a lot to recover from difficulty. They are friendly and provide you instant help.

    Frequently asked questions of Printer: How do I troubleshoot my HP printer?

    Visit our webpage:

    https://www.customerservicehelpnumber.com/hp-printer-support

    Thank You.

Displaying 1 to 10 of 10 messages