Skip to content

SfDatePicker doesn't have a field to display the selected Date ? #50

@GabrielRocha593

Description

@GabrielRocha593

To give context
I'm working with MAUI 8
In a customer registration, where one of the fields is the Date of Birth, to implement this field in the view I am using SfDatePicker.
but then encountered some difficulties

I want SfDatePicker to behave similar to the native DatePicker.

In DatePicker, the selected date appears as if it were an Entry, but when the user clicks on the field, a calendar opens to select the date.

Using SfDatePicker to have the same behavior I had to use an Entry field to show the selected date.

I'm opening this ticket to check if there is a simpler way to implement this behavior with SfDatePicker

So I can do the same thing using only DatePicker

Here's an example:

<!--Syncfusion implementation -->
<PickerEntry:SfDatePicker x:Name="PickerNascimento"
                            SelectedDate="{Binding SelectedNascimento, Mode=TwoWay}"
                            Format="dd_MM_yyyy"
                            Mode="Dialog">
</PickerEntry:SfDatePicker>

<inputLayout:SfTextInputLayout Hint="Nascimento" ContainerType="Outlined">
	<Entry Text="{Binding SelectedNascimentoString, Mode=TwoWay}" x:Name="NascimentoEntry" Focused="NascimentoEntry_Focused" Grid.Column="0" Grid.Row="0"/>
</inputLayout:SfTextInputLayout>

<!--Native-->
<inputLayout:SfTextInputLayout Hint="Nascimento" ContainerType="Outlined">
	<DatePicker    Date="{Binding ItemEmEdicao.DataNascimento, Mode=TwoWay}"
				Format="dd/MM/yyyy"
                                MaximumDate="{Binding MaxDateNascimento, Mode=TwoWay}"/>
</inputLayout:SfTextInputLayout>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions