Copy date field and time field into a single datetime field

  • dianner
    Asked on December 14, 2019 at 4:11 AM

    I'm trying to copy a date and time into a date field that contains a time. I've followed all of these instructions. The date gets copied but not the time. Is this something I should be able to do?

    Here is a link to my Conditions statement

    https://www.jotform.com/build/193468381793170/settings/conditions

    I need to have a date and time for the Google Calendar integration for both the start and end date/time but I don't want to show date and time for each. I just want to get input for date, start time, and end time. I definitely don't want the user to put 2 different dates. Thanks for your help.

  • Vanessa_T
    Replied on December 14, 2019 at 5:12 AM

    Unfortunately, that is not possible since concatenating two fields will make them in plain "text" value which the datetime field could not understand. I also tried to find a workaround, but could not find any.

    As you might have already tested, you may copy a datetime field to another datetime field also.

  • dianner
    Replied on December 14, 2019 at 10:17 AM

    ok - so let's try another way. Is there a way using CSS to copy the individual date and time into a combined Date/time field? I have never used CSS, but if you tell me the commands to use I can do it.

  • Vanessa_T
    Replied on December 14, 2019 at 11:31 AM

    Please note that CSS is only for styling/display. And no, we cannot use CSS to copy the data, you would need JS instead to do that, but you cannot insert JS into the form.

    You may however, embed the form into your website using the source code then hire a developer to create a script that can copy the values to another field.

    https://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form