Date Picker/Time Picker

Hey when using the -Label this does not display on the page.

Any thoughts? Bug?

PU - 1.4.4 FW - 3.2.0

Should add I am using these within a form in case that’s important.

Secondly, I can pull the data out of the object but its in the format of Date Time, I need to select just the dates but that does not seem to be working in the normal fashion. Any pointers would be great.


I have had to do this a long way round so any suggestions on simplification would be great.

$FormContent = $Body | ConvertFrom-Json
$StartDate = (get-date -date $FormContent.StartDate).ToShortDateString()
Show-UDToast $StartDate

Sounds like a bug and we can look at making that interface better. That is a bit of work. I think we should be able to figure out how to return it just as a DateTime object.

Sounds good Adam,

I had to have some fun to get it all working:

$FormContent = $Body | ConvertFrom-Json
$StartDate = (get-date -date $FormContent.StartDate)
$EndDate = (get-date -date $FormContent.EndDate)
$StartTime= (get-date -date $FormContent.StartTime)
$EndTime = (get-date -date $FormContent.EndTime)

		$StartDateTime = ($StartDate.ToShortDateString()+" "+$StartTime.ToShortTimeString())
		$endingDateTime = ($EndDate.ToShortDateString()+" "+$EndTime.ToShortTimeString())

Hi @SnV I actually updated my date/time component recently to include quite a few new features. I got so excited about it I wrote a whole blog here:-
maybe this could be an alternative for you until the bug is fixed? You have complete control over the format of the date/time output you want to record. I hope this helps.


Does this work for PU? I know before you have said that you have not updated yet.


As far as I know it should, updating is still on my to-do list :roll_eyes: seems like I’m heading a marketing campaign at the moment for work :roll_eyes: so been pretty busy doing that. I know @adam has stated that components on the marketplace should work with PU.
Think one person on the forum said something didn’t work for them (another one of my components) but didn’t go into anymore detail. All I could advise if this is need to have now, then give it a go. The worst thing is the component will not render, so what you got to loose :partying_face:
I’d be happy to diagnose if it didn’t work, might even prompt me to finally install PU :grinning:

Thanks, Its ok I basically wrote the following code that works for me:

$FromDateTime =  (get-date -date ((get-date -date $FormContent.FromDate).ToShortDateString()+" "+ (get-date -date $FormContent.FromTime).ToShortTimeString())).ToString("yyyy-MM-dd HH:mm:ss")

$ToDateTime =  (get-date -date ((get-date -date $FormContent.ToDate).ToShortDateString()+" "+ (get-date -date $FormContent.ToTime).ToShortTimeString())).ToString("yyyy-MM-dd HH:mm:ss")
1 Like