Hi I have a collectionview with [days of the week, a checkbox, and a SFtimepicker]. My xaml code for the collection view looks like this:
<CollectionView x:Name="RepeatCollectionView" HorizontalOptions="Center" ItemsSource="{Binding DayList}" HeightRequest="320">
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="0" RowDefinitions="45" ColumnDefinitions="*,*">
<Label Text="{Binding Day}" FontAttributes="Bold" FontSize="Medium"
Margin="30,0"
VerticalTextAlignment="Center" HorizontalTextAlignment="Start"/>
<CheckBox x:Name="SelectDayCheckBox" Grid.Row="0" Grid.Column="1" HorizontalOptions="Start" IsChecked="{Binding Selected, Mode=TwoWay}" BindingContext="{Binding .}" CheckedChanged="SelectDayCheckBox_CheckedChanged"/>
<inputLayout:SfTextInputLayout
Margin="30, 0"
Hint="Select a Time"
OutlineCornerRadius="8"
ContainerBackgroundColor="Transparent" Grid.Column="1">
<Grid VerticalOptions="Center" HeightRequest="60">
<Label VerticalOptions="Center" FontFamily="SecondFont" VerticalTextAlignment="Center" x:Name="DateEntry" IsEnabled="False" TextColor="Red"/>
<Grid.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/>
</Grid.GestureRecognizers>
</Grid>
</inputLayout:SfTextInputLayout>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
My problem is I am able to open the timer but how am I to reference the SfTextInputLayout-Label which opens the timepicker? I am unable to show the user the time they selected.
i have this as my timepicker ok button:
private void date_OkButtonClicked(object sender, Syncfusion.SfPicker.XForms.SelectionChangedEventArgs e)
{
var selectedItem = date.SelectedItem as ObservableCollection<object>;
string hour = selectedItem[0].ToString();
string min = selectedItem[1].ToString();
string AmPm = selectedItem[2].ToString();
DateEntry.Text = hour + ":" + min + " " + AmPm;
}
but the name DateEntry does not exsist in the current context
Than
Thanks this works