Uno: [WASM] DatePicker is broken

Created on 1 Mar 2020  路  3Comments  路  Source: unoplatform/uno

DatePicker is producing weird issues in the WASM head. 2 different problems are listed and are possibly related in this issue report.

Issue 1

  1. Create an empty Uno Platform application
  2. in the MainPage.xaml replace the content to just a DatePicker
<Page ...>
    <DatePicker />
</Page>
  1. Run the WASM head.
  2. Nothing is rendered!

Issue 2

  1. Create an empty Uno Platform application
  2. in the MainPage.xaml, add this as content
<Page
    x:Class="SampleApp.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
    mc:Ignorable="d" DataContext="{Binding Source={StaticResource Composition}, Path=Root}">

    <controls:MasterDetailsView>
        <controls:MasterDetailsView.NoSelectionContentTemplate>
            <DataTemplate>
                <DatePicker />
            </DataTemplate>
        </controls:MasterDetailsView.NoSelectionContentTemplate>
    </controls:MasterDetailsView>

</Page>
  1. Run the WASM head.
  2. The application will break on startup!

If you open the dev menu, you will see this error:

image

Packages

<PackageReference Include="Uno.UI" Version="2.1.0-dev.1402" />
<PackageReference Include="Uno.UI.RemoteControl" Version="2.1.0-dev.1402" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.Wasm.Bootstrap" Version="1.1.0-dev.422" />
<DotNetCliToolReference Include="Uno.Wasm.Bootstrap.Cli" Version="1.0.10" />
<PackageReference Include="Reactive.Wasm" Version="1.2.2" />
<PackageReference Include="ReactiveUI.Uno" Version="11.2.1" />
kinbug projecinput

Most helpful comment

This is caused by datepicker's control-template. #2707 partially addressed this by fixing the template.

However, the selector for datepicker will requires additional works, either by re-implementing it from scratch, or use a native wrapper for datepicker using <input type='date' />, or mix of both.

All 3 comments

This is caused by datepicker's control-template. #2707 partially addressed this by fixing the template.

However, the selector for datepicker will requires additional works, either by re-implementing it from scratch, or use a native wrapper for datepicker using <input type='date' />, or mix of both.

There's a few date control issues, notably https://github.com/unoplatform/uno/issues/365.

It seems the DatePicker is still broken
image

While it renders this, no interaction is possible.

Was this page helpful?
0 / 5 - 0 ratings