|
|
@@ -9,9 +9,7 @@ class ActionDateAlert extends StatefulWidget { |
|
|
|
final TextStyle selectedStyle; |
|
|
|
final String maxTimeNew; |
|
|
|
|
|
|
|
const ActionDateAlert({Key key, this.title, this.normalStyle, this.selectedStyle,this.maxTimeNew}) : super(key: key); |
|
|
|
|
|
|
|
|
|
|
|
const ActionDateAlert({Key key, this.title, this.normalStyle, this.selectedStyle, this.maxTimeNew}) : super(key: key); |
|
|
|
|
|
|
|
@override |
|
|
|
State<StatefulWidget> createState() => _ActionDateAlert(); |
|
|
@@ -34,9 +32,7 @@ class _ActionDateAlert extends State<ActionDateAlert> { |
|
|
|
width: double.infinity, |
|
|
|
height: 250, |
|
|
|
margin: EdgeInsets.all(0), |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: Colors.white, |
|
|
|
borderRadius: BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10))), |
|
|
|
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10))), |
|
|
|
child: Column( |
|
|
|
children: <Widget>[ |
|
|
|
widget.title == null || widget.title == '' |
|
|
@@ -87,14 +83,15 @@ class _ActionDateAlert extends State<ActionDateAlert> { |
|
|
|
|
|
|
|
Widget _createContent(BuildContext context) { |
|
|
|
DateTime maxTime; |
|
|
|
if(!EmptyUtil.isEmpty(widget.maxTimeNew) && widget.maxTimeNew=="max"){ |
|
|
|
maxTime=DateTime.now(); |
|
|
|
}else{ |
|
|
|
maxTime=DateTime.parse("2100-12-31 23:59:59"); |
|
|
|
if (!EmptyUtil.isEmpty(widget.maxTimeNew) && widget.maxTimeNew == "max") { |
|
|
|
maxTime = DateTime.now(); |
|
|
|
} else { |
|
|
|
maxTime = DateTime.parse("2100-12-31 23:59:59"); |
|
|
|
} |
|
|
|
return DatePickerWidget( |
|
|
|
maxDateTime: maxTime, |
|
|
|
initialDateTime: _dateTime, |
|
|
|
onMonthChangeStartWithFirstDate: true, |
|
|
|
onChange: (dataTime, list) { |
|
|
|
_dateTime = dataTime; |
|
|
|
}, |
|
|
|