'Setting a reset value in a datepicker using mobiscroll DATE, DateTimer

Code :

         handler: function (event, inst) { 
        alert('Custom button clicked!'); 
         that.mobiscroll('setValue', ['0', '0', '0', '0']);
    } 
},

the above mentioned part of a code is not working for date picker. the expected result is shown as [00]-[000]-[0000] for the format [01]-[aug]-[2015]

IN MOBISCROLL DATE(.mobiscroll().date(.....))

Full code:

$('#demo_date').mobiscroll().date({
    theme: theme,     // Specify theme like: theme: 'ios' or omit setting to use default 
    mode: mode,       // Specify scroller mode like: mode: 'mixed' or omit setting to use default 
    display: display, // Specify display mode like: display: 'bottom' or omit setting to use default 
    lang: lang,       // Specify language like: lang: 'pl' or omit setting to use default 
    headerText:'onset date picker',
    showLabel:true,
    dateFormat:'dd/M/yy',
    dateOrder:'ddMyy',
    dayText:'Day',
    monthText:'Month',
    yearText:'year',
    buttons: [ 
    { 
      text: 'reset',
      cssClass: 'dwb2 dwb-e dwb', 
      /*handler:'clear',*/
      handler: function (event, inst) { 
          alert('Custom button clicked!'); 
          that.mobiscroll('setValue', ['0', '0', '0', '0']);
      } 
    },
    { 
      text: 'cancel', 
      handler: 'cancel',         
      cssClass: 'dwb2 dwb-e dwb'
    } ,
    {
      text:'ok',
      handler:'set',
      cssClass:'dwb2 dwb-e dwb' 
    }
 ]              
   });

I mentioned both full code part and some part of the code is not working.



Solution 1:[1]

$(this).mobiscroll('setValue', ['0', '0', '0', '0']);

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1