Skip to content

Commit

Permalink
SAK-33693 Could not actually null out dates anymore in syllabus (saka…
Browse files Browse the repository at this point in the history
  • Loading branch information
jonespm authored Dec 17, 2017
1 parent caaa2dd commit f1d95bb
Showing 1 changed file with 21 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,9 @@ public void setStartDateString(String startDateString) {
Map<String, String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
String startISODate = params.get((getEntry().getPosition() - 1) + HIDDEN_START_ISO_DATE);
if(DateFormatterUtil.isValidISODate(startISODate)){
getEntry().setStartDate(DateFormatterUtil.parseISODate(startISODate));
getEntry().setStartDate(DateFormatterUtil.parseISODate(startISODate));
} else {
getEntry().setStartDate(null);
}
this.startDateString = DateFormatterUtil.format(getEntry().getStartDate(), DATEPICKER_DATETIME_FORMAT, rb.getLocale());
}
Expand All @@ -328,8 +330,11 @@ public void setEndDateString(String endDateString) {
Map<String, String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
String endISODate = params.get((getEntry().getPosition() - 1) + HIDDEN_END_ISO_DATE);
if(DateFormatterUtil.isValidISODate(endISODate)){
getEntry().setEndDate(DateFormatterUtil.parseISODate(endISODate));
getEntry().setEndDate(DateFormatterUtil.parseISODate(endISODate));
} else {
getEntry().setEndDate(null);
}

this.endDateString = DateFormatterUtil.format(getEntry().getEndDate(), DATEPICKER_DATETIME_FORMAT, rb.getLocale());
}
}
Expand Down Expand Up @@ -2731,8 +2736,11 @@ public void setSyllabusDataStartDate(String date)
Map<String, String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
String startISODate = params.get(HIDDEN_START_ISO_DATE);
if(DateFormatterUtil.isValidISODate(startISODate)){
syllabusData.setStartDate(DateFormatterUtil.parseISODate(startISODate));
syllabusData.setStartDate(DateFormatterUtil.parseISODate(startISODate));
} else {
syllabusData.setStartDate(null);
}

}
}
}
Expand Down Expand Up @@ -2787,7 +2795,9 @@ public void setSyllabusDataEndDate(String date)
Map<String, String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
String endISODate = params.get(HIDDEN_END_ISO_DATE);
if(DateFormatterUtil.isValidISODate(endISODate)){
syllabusData.setEndDate(DateFormatterUtil.parseISODate(endISODate));
syllabusData.setEndDate(DateFormatterUtil.parseISODate(endISODate));
} else {
syllabusData.setEndDate(null);
}
}
}
Expand Down Expand Up @@ -2992,7 +3002,9 @@ public void setStartDateString(String date)
Map<String, String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
String startISODate = params.get(HIDDEN_START_ISO_DATE);
if(DateFormatterUtil.isValidISODate(startISODate)){
setStartDate(DateFormatterUtil.parseISODate(startISODate));
setStartDate(DateFormatterUtil.parseISODate(startISODate));
} else {
setStartDate(null);
}
}
}
Expand All @@ -3014,8 +3026,11 @@ public void setEndDateString(String date)
Map<String, String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
String endISODate = params.get(HIDDEN_END_ISO_DATE);
if(DateFormatterUtil.isValidISODate(endISODate)){
setEndDate(DateFormatterUtil.parseISODate(endISODate));
setEndDate(DateFormatterUtil.parseISODate(endISODate));
} else {
setEndDate(null);
}

}
}

Expand Down

0 comments on commit f1d95bb

Please sign in to comment.