New-UDApp -Title 'NewITDVMwareVMSnapshotTask' -Pages @(
    New-UDPage -Name "NewITDVMwareVMSnapshotTask" -Content {
        New-UDForm -Content {
            New-UDTextbox -Label 'VMName' -Id 'VMName'
            New-UDTextbox -Label 'HoursToKeep' -Id 'HoursToKeep'
            New-UDDatePicker -Label 'StartDate' -Id "StartDate" -Variant dialog
            New-UDTimePicker -Label 'StartTime' -Id "StartTime"
            
        } -OnSubmit {
        #Show-UDToast -Message $EventData.txtTextField
        #Show-UDToast -Message $EventData.chkCheckbox
        #Invoke-PSUScript -Script 'Test-FormSubmission.ps1' -VMName $EventData.VMName
        #"Current User = $User, StartDate = " + $EventData.StartDate + "  " + $EventData.StartTime


            
            $StartDateTime = $EventData.StartDate.Date
            $StartDateTime = $StartDateTime.AddHours($EventData.StartTime.Hour)
            $StartDateTime = $StartDateTime.AddMinutes($EventData.StartTime.Minute)
            Show-UDToast -Message ("Start Date/Time is: " + $StartDateTime) -Duration 20000
        }
    }
)