EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Pierre on August 27, 2013, 10:22:54 PM



Title: easyui-datebox not updated
Post by: Pierre on August 27, 2013, 10:22:54 PM
Hi all
I have some date field on my form.
if I use input class="easyui-datebox" on the form, value of that filed is not updated.
If I use input class="easyui-validatebox" instead, everything woks fine.
Any idea why ?

Here is the code:

Code:
function			saveCalendarTask()
{
  $('#form_task_calendar').form('submit',
    {
      onSubmit: function()
      {
        return $(this).form('validate');
      },
      success: function(result){
      if (result.substring(0,5) == "Error")
        $.messager.alert('Info',result,'error');
      else
        {
          $('#dlg_calendar_task_edit').dialog('close');
        title = $('#task_title').val();
          start = $('#task_start_date').val()+" "+$('#task_start_time').val();
   alert(start);  // here I have old date if I use input class="easyui-datebox"
          if ($('#task_operacija').val()==1)
          {
          calendar_add(id,title,start,end,ccolor);
          }
        }
      }
    });
}


Thanks!


Title: Re: easyui-datebox not updated
Post by: varonica on August 28, 2013, 12:28:22 AM
Have you tried 'getValue' ?

$('#task_start_date').datebox('getValue');


Title: Re: easyui-datebox not updated
Post by: Pierre on August 28, 2013, 01:45:54 AM
It works perfect, thank you!