|
@@ -53,12 +53,12 @@ render_element(Record) ->
|
|
init(Id,#calendar{minDate=Min,maxDate=Max,lang=Lang,format=Form,
|
|
init(Id,#calendar{minDate=Min,maxDate=Max,lang=Lang,format=Form,
|
|
value=Value,onSelect=SelectFn,disableDayFn=DisDayFn,
|
|
value=Value,onSelect=SelectFn,disableDayFn=DisDayFn,
|
|
position=Pos,reposition=Repos,yearRange=YearRange} = Calendar) ->
|
|
position=Pos,reposition=Repos,yearRange=YearRange} = Calendar) ->
|
|
- io:format("Calendar: ~p~n",[Calendar]),
|
|
|
|
|
|
+% io:format("Calendar: ~p~n",[Calendar]),
|
|
ID = nitro:to_list(Id),
|
|
ID = nitro:to_list(Id),
|
|
I18n = "clLangs.ua",
|
|
I18n = "clLangs.ua",
|
|
Format = "YYYY-MM-DD",
|
|
Format = "YYYY-MM-DD",
|
|
DefaultDate = case Value of {Yv,Mv,Dv} -> nitro:f("new Date(~s,~s,~s)",[nitro:to_list(Yv),nitro:to_list(Mv-1),nitro:to_list(Dv)]); _ -> "new Date(2019, 10, 7)" end,
|
|
DefaultDate = case Value of {Yv,Mv,Dv} -> nitro:f("new Date(~s,~s,~s)",[nitro:to_list(Yv),nitro:to_list(Mv-1),nitro:to_list(Dv)]); _ -> "new Date(2019, 10, 7)" end,
|
|
- io:format("Default Date: ~p~n",[DefaultDate]),
|
|
|
|
|
|
+% io:format("Default Date: ~p~n",[DefaultDate]),
|
|
MinDate = "null", % case Min of {Y,M,D} -> nitro:f("new Date(~s,~s,~s)",[nitro:to_list(Y), nitro:to_list(M-1), nitro:to_list(D)]); _ -> "new Date(2009, 3, 4)" end,
|
|
MinDate = "null", % case Min of {Y,M,D} -> nitro:f("new Date(~s,~s,~s)",[nitro:to_list(Y), nitro:to_list(M-1), nitro:to_list(D)]); _ -> "new Date(2009, 3, 4)" end,
|
|
MaxDate = "new Date(2020,10,10)", %case Max of {Y1,M1,D1} -> nitro:f("new Date(~s,~s,~s)",[nitro:to_list(Y1),nitro:to_list(M1-1),nitro:to_list(D1)]); _ -> "new Date(2089, 4, 1)" end,
|
|
MaxDate = "new Date(2020,10,10)", %case Max of {Y1,M1,D1} -> nitro:f("new Date(~s,~s,~s)",[nitro:to_list(Y1),nitro:to_list(M1-1),nitro:to_list(D1)]); _ -> "new Date(2089, 4, 1)" end,
|
|
OnSelect = "null",
|
|
OnSelect = "null",
|