anchor.diff:      Format = case Form of
                    undefined -> "YYYY-MM-DD";
                    Form -> Form 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)]);
  +                      _ -> "null" end,
       MinDate = 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(2000, 0, 1)" end,
  
positive.code:       {<<"required">>,if Record#calendar.required == true -> "required"; true -> undefined end},
        {<<"step">>,Record#calendar.step},
        {<<"type">>, <<"calendar">>},
        {<<"placeholder">>,Record#calendar.placeholder},
        {<<"value">>,nitro:js_escape(Record#calendar.value)} | Record#calendar.data_fields
      ],
      wf_tags:emit_tag(<<"input">>, nitro:render(Record#calendar.body), List).
  
  init(Id,#calendar{minDate=Min,maxDate=Max,lang=Lang,format=Form}) ->
      ID = nitro:to_list(Id),
      I18n = case Lang of
                 undefined -> "clLangs.ua";
  
negative.code:             field: document.getElementById('~s'),
              firstDay: 1,
              i18n: ~s,
              defaultDate: ~s,
              setDefaultDate: true,
              minDate: ~s,
              maxDate: ~s,
              format: '~s'
          });",
          [ID,ID,I18n,DefaultDate,MinDate,MaxDate,Format]
      )).