SeslDatePicker
open class SeslDatePicker : LinearLayout, SeslSimpleMonthView.OnDayClickListener, View.OnClickListener, View.OnLongClickListener, SeslSimpleMonthView.OnDeactivatedDayClickListener(source)
A custom date picker widget for selecting dates, supporting both standard and lunar calendars.
The SeslDatePicker
provides a user interface for date selection, allowing users to pick a year, month, and day. It supports various configurations, including minimum and maximum date constraints, and can be customized for different locales and calendar systems.
This widget is designed to be used within Android applications that require date input from users. It integrates with accessibility services and provides support for custom fonts, animations, and Samsung-specific features such as lunar calendar conversion.
Features:
- Standard and lunar calendar support
- Customizable appearance and font
- Minimum and maximum date constraints
- Accessibility support
- Locale-aware formatting
- Samsung-specific enhancements
Usage Example:
SeslDatePicker datePicker = new SeslDatePicker(context);
datePicker.setMinDate(minDateInMillis);
datePicker.setMaxDate(maxDateInMillis);
datePicker.init(year, month, day, new SeslDatePicker.OnDateChangedListener() {
public void onDateChanged(SeslDatePicker view, int year, int monthOfYear, int dayOfMonth) {
// Handle date change
}
});
Content copied to clipboard
See also
Constructors
Link copied to clipboard
constructor(@NonNull context: @NonNull Context, @Nullable attrs: @Nullable AttributeSet, defStyleAttr: Int)
constructor(@NonNull context: @NonNull Context, @Nullable attrs: @Nullable AttributeSet, defStyleAttr: Int, defStyleRes: Int)
Types
Link copied to clipboard
Interface to define the different date selection modes.
Link copied to clipboard
interface OnDateChangedListener
The callback used to indicate the user changed the date.
Link copied to clipboard
interface OnEditTextModeChangedListener
Interface definition for a callback to be invoked when the edit text mode of a DatePicker changes.
Link copied to clipboard
interface OnViewTypeChangedListener
Interface definition for a callback to be invoked when the current view type is changed.
Link copied to clipboard
Properties
Link copied to clipboard
This mode to select the start of a date range.
Link copied to clipboard
The default selection mode where user can select a date.
Link copied to clipboard
This mode to select the start of a date range.
Link copied to clipboard
The mode where the user can select a week.
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
Link copied to clipboard
Gets a boolean indicating whether the calendar view is disabled.
Link copied to clipboard
Gets the current view type.
Link copied to clipboard
Gets the current date selection mode.
Link copied to clipboard
Link copied to clipboard
Gets the EditText used for the picker given.
Link copied to clipboard
Retrieves the end date.
Link copied to clipboard
Gets the first day of the week.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Gets the start date of the date range.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Handles the click event on a day in the month view.
Link copied to clipboard
open fun onDeactivatedDayClick(@NonNull view: @NonNull SeslSimpleMonthView, year: Int, month: Int, selectedDay: Int, isLeapMonth: Boolean, isPrevMonth: Boolean)
Handles the click event for a deactivated day in the calendar view.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Use this method to enable/disable the calendar view.
Link copied to clipboard
Sets the current view type.
Link copied to clipboard
Sets the selection mode for the DatePicker.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Sets the edit text mode for the spinner layout.
Link copied to clipboard
Link copied to clipboard
Sets the first day of the week.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Sets the maximal date supported by this DatePicker in milliseconds since January 1, 1970 00:00:00 in getDefault time zone.
Link copied to clipboard
Sets the minimal date that can be selected in this NumberPicker.
Link copied to clipboard
open fun setOnEditTextModeChangedListener(@Nullable onEditModeChangedListener: @Nullable SeslDatePicker.OnEditTextModeChangedListener)
Sets a listener to be notified when the isEditTextMode is changed.
Link copied to clipboard
open fun setOnViewTypeChangedListener(@Nullable listener: @Nullable SeslDatePicker.OnViewTypeChangedListener)
Sets a listener to be notified when the view type changes.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Updates the current date.