Skip to content

Commit

Permalink
Panchenko. Fixed datetime-local bug
Browse files Browse the repository at this point in the history
  • Loading branch information
KostyantynPanchenko committed Oct 27, 2016
1 parent 0cd1956 commit 92778a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ public ModelAndView processTimeSlotSearchForm(
@RequestParam(name="end") String end) {

ModelAndView model = new ModelAndView("excursions/excursionsInSlotResults");
start = start.replace('T', ' ');
end = end.replace('T', ' ');
// trim milliseconds and delimiters
start = start.replace('T', ' ').substring(0, (start.length() - 7));
end = end.replace('T', ' ').substring(0, (end.length() - 7));
model.addObject("start", start);
model.addObject("end", end);

Expand Down
5 changes: 3 additions & 2 deletions src/com/softserve/museum/web/controller/GuidesController.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ public ModelAndView findAvailable(
@RequestParam(name="end") String end) {

ModelAndView model = new ModelAndView("guides/guidesAvailableResults");
start = start.replace('T', ' ');
end = end.replace('T', ' ');
// trim milliseconds and delimiters
start = start.replace('T', ' ').substring(0, (start.length() - 7));
end = end.replace('T', ' ').substring(0, (end.length() - 7));
model.addObject("start", start);
model.addObject("end", end);
model.addObject("guides", guideService.findByTime(start, end));
Expand Down

0 comments on commit 92778a1

Please sign in to comment.