Hi Rakesh,
Thanks for contacting Syncfusion support.
We can achieve your requirement using focusOut and focusIn event. In focusIn event, we can store the initial value of numeric textbox in the temporary variable. In focusOut, check the textbox value is empty or not. If it is empty, then assign the temporaryvariable value to the textboxvalue. Please refer the following code snippet.
<script>
$(function () {
var temp;
$("#numeric").ejNumericTextbox(
{
name: "numeric",
value: 35,
minValue: 0,
width:"100%",
focusOut: function (e) {
if(e.value=="")
this.option("value",temp);
},
focusIn: function (e) {
temp=e.value;
}
});
})
</script>
|
To know more about the list of properties, methods, and events available in Numerictextbox, please check the following link
http://help.syncfusion.com/js/api/ejtextboxes
Regards,
Francis Paul A