public class DateUtil extends Object
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
protected Date |
defaultMaxSelectableDate |
|
protected Date |
defaultMinSelectableDate |
|
protected Date |
maxSelectableDate |
|
protected Date |
minSelectableDate |
| 构造器 | 说明 |
|---|---|
DateUtil() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
boolean |
checkDate(Date date) |
Checks a given date if it is in the formally specified date range.
|
Date |
getMaxSelectableDate() |
Gets the maximum selectable date.
|
Date |
getMinSelectableDate() |
Gets the minimum selectable date.
|
Date |
setMaxSelectableDate(Date max) |
Sets the maximum selectable date.
|
Date |
setMinSelectableDate(Date min) |
Sets the minimum selectable date.
|
void |
setSelectableDateRange(Date min,
Date max) |
Sets a valid date range for selectable dates.
|
protected Date minSelectableDate
protected Date maxSelectableDate
protected Date defaultMinSelectableDate
protected Date defaultMaxSelectableDate
public void setSelectableDateRange(Date min, Date max)
min - the minimum selectable date or null (then the minimum date is
set to 01\01\0001)max - the maximum selectable date or null (then the maximum date is
set to 01\01\9999)public Date setMaxSelectableDate(Date max)
max - the maximum selectable datepublic Date setMinSelectableDate(Date min)
min - the minimum selectable datepublic Date getMaxSelectableDate()
public Date getMinSelectableDate()
public boolean checkDate(Date date)
date - the date to checkCopyright © 2019. All rights reserved.