<inputLayout:SfTextInputLayout Hint="Time" ContainerType="Outlined">
<Grid VerticalOptions="Center" HeightRequest="50">
<Label VerticalOptions="Center" VerticalTextAlignment="Center" x:Name="entry"/>
<Grid.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</Grid.GestureRecognizers>
</Grid>
</inputLayout:SfTextInputLayout>
<timePicker:SfDatePicker x:Name="datePicker" IsOpen="False" DateSelected="DatePicker_DateSelected"
PickerMode="Dialog" HorizontalOptions="Center" VerticalOptions="Center"
PickerHeight="300"
PickerWidth="300"/> |
private void TapGestureRecognizer_Tapped(object sender, EventArgs e)
{
datePicker.IsOpen = true;
} |
Hi Michael,
Greetings from Syncfusion.
We have analyzed your query and you can full fill this requirement by using TapGesture Recognizer of the layout as like below code snippet.
XAML:
<inputLayout:SfTextInputLayout Hint="Time" ContainerType="Outlined"><Grid VerticalOptions="Center" HeightRequest="50"><Label VerticalOptions="Center" VerticalTextAlignment="Center" x:Name="entry"/><Grid.GestureRecognizers><TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/></Grid.GestureRecognizers></Grid></inputLayout:SfTextInputLayout><timePicker:SfDatePicker x:Name="datePicker" IsOpen="False" DateSelected="DatePicker_DateSelected"PickerMode="Dialog" HorizontalOptions="Center" VerticalOptions="Center"PickerHeight="300"PickerWidth="300"/>
C#:
private void TapGestureRecognizer_Tapped(object sender, EventArgs e){datePicker.IsOpen = true;}
We have created sample based on this , lease find the sample from below.
Sample:
https://www.syncfusion.com/downloads/support/directtrac/general/ze/DatePicker-468484022.zip
Please let us know if you have any other queries.
Regards,
Sakthivel P.
<inputLayout:SfTextInputLayout x:Name="InputLayoutBirthday"
VerticalOptions="Center"
Hint="Birthday"
LeadingViewPosition="Inside">
<Entry VerticalOptions="Center"
InputTransparent="True"
IsReadOnly="True"
TextColor="Black"
x:Name="EntryBirthday"/>
<inputLayout:SfTextInputLayout.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</inputLayout:SfTextInputLayout.GestureRecognizers>
<inputLayout:SfTextInputLayout.LeadingView>
<Label Text="🗓" />
</inputLayout:SfTextInputLayout.LeadingView>
</inputLayout:SfTextInputLayout> |