This is a migrated thread and some comments may be shown as answers.

Datepicker autofills the date, how to block this effect?

0 Answers 14 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
M
Top achievements
Rank 1
M asked on 08 May 2012, 08:26 AM
I am using below simple code for my Html.Telerik().DatePicker() 2011.3.1115
@(Html.Telerik().DatePicker()
            .Name("DatePicker")    
.Value(Model).Format("dd-MMM-yyyy")        
    )

The textbox that this code renders is editable.
So when I enter some "half date", the datepicker has an effect of automatically completing the year by itself.
Suppose, I entered "04-Mar" in my textbox then the moment I click anywhere in the page the telerik datepicker autoupdates the textbox i.e. it adds the current year to the date. Thus making it "04-Mar-2012".
I wanted to stop/remove this feature from the Html.Telerik().DatePicker() but couldnt find any help. 
I tried unbinding the "blur" and "change" events of the textbox, but that also didnt helped.

Didnt worked :(

$('#DatePicker').unbind('blur');
$('#DatePicker').unbind('change');
$(document).unbind('click');

So kindly let me know how should I do it.

Thanks,
M
Tags
Date/Time Pickers
Asked by
M
Top achievements
Rank 1
Share this question
or