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' -Maximum 72 -Minimum 1 -Type number
            New-UDDatePicker -Label 'StartDate' -Id "StartDate"
            New-UDTimePicker -Label 'StartTime' -Id "StartTime"
            
        } -OnSubmit {          
            $StartDateTime = $EventData.StartDate.Date
            $StartDateTime = $StartDateTime.AddHours($EventData.StartTime.Hour)
            $StartDateTime = $StartDateTime.AddMinutes($EventData.StartTime.Minute)
            Show-UDToast -Message ("Start Date/Time is: " + $StartDateTime + "`n User is " + $User) -Duration 20000
        }
    }
)