Skip to content
Browse files

[fix] datepicker: Datepicker now creates dates at 12h to avoid date s…

…hifts
  • Loading branch information...
1 parent 865ee95 commit 9cc4918c8da0fe6540dc6634abdaef2a2352a48a Nicolas Glondu committed Oct 6, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 stdlib/widgets/datepicker/datepicker.opa
View
3 stdlib/widgets/datepicker/datepicker.opa
@@ -592,7 +592,8 @@ WDatepicker = {{
mkdate((y, m, d): (int, int, int)): option(Date.date) =
if m >= 1 && m <= 12 && d >= 1 && d <= 31 then
epoch_hr = Date.to_human_readable(Date.epoch)
- { epoch_hr with year=y month=Date.Month.of_int(m - 1) day=d }
+ { epoch_hr with
+ year=y month=Date.Month.of_int(m - 1) day=d h=12 min=0 s=0 }
|> Date.of_human_readable(_) |> some(_)
else
none

0 comments on commit 9cc4918

Please sign in to comment.
Something went wrong with that request. Please try again.