DatePicker Input


#1

Has anyone implemented a Date Picker Input field?


#2

New-UDElement -Id ‘date’ -Tag ‘input’ -Attributes @{
type = “date”
id = “date”
value = “”
}

So I got this showing but how can I set the Value attribute to grab the value of the date picker?? or this not possible?


#3

You can use New-UDInput to create a datepicker but I don’t think you’ll be able to do it with New-UDElement.

Here’s an example of how we use it in the integration tests:https://github.com/ironmansoftware/universal-dashboard/blob/master/src/UniversalDashboard.UITest/Integration/Input.Tests.ps1#L151


#4

@adam, question, is there any way to change this behavior? after a date is selected, and you call the date picker again, a date of 1918 is shown :wink:


#5

Unfortunately, there is a bug in the JavaScript library we are using for this. I have this slated for 3.0 at the moment but if I can fix it earlier, I will.


#6

AWESOMENESS! thanks @adam !