textAlign property
How the text should be aligned horizontally in SfDateRangePicker header view.
Defaults to TextAlign.left
.
See also:
- textStyle, which allows to set style for the header text in the date range picker.
- SfDateRangePicker.showNavigationArrow, which displays the navigation arrows on the header view of the date range picker.
- SfDateRangePicker.monthFormat, which allows to customize the month text in the header view also in the year cell view of date range picker.
- Knowledge base: How to style a header
- Knowledge base: How to customize the header view
- Knowledge base: How to navigate to the previous or next dates using navigation arrows
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SfDateRangePicker(
controller: _pickerController,
view: DateRangePickerView.month,
selectionMode: DateRangePickerSelectionMode.single,
headerStyle: DateRangePickerHeaderStyle(
textAlign: TextAlign.right,
)),
),
);
}
Implementation
final TextAlign textAlign;