Hello,
i want to display --/--/---- in my datepicker controls textbox.
i used emptymessage property but once i entered something in my textbox it removed the format --/--/----.
i want that once user enter something it should display like that 12/--/----.
is it possible to display like this?
thanks
Sweta
8 Answers, 1 is accepted
0
Hi Sweta,
I am afraid RadDateInput does not support masks. Only RadMaskedTextBox does.
Regards,
Dimo
the Telerik team
I am afraid RadDateInput does not support masks. Only RadMaskedTextBox does.
Regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Sourabh
Top achievements
Rank 1
answered on 27 Mar 2012, 12:02 PM
hello,
i am facing a problem with datepicker.
you see u can enter alphabets in textbox of rad datepicker is there any solution to avoid this and allow user to only allow to enter numeric values??
i am facing a problem with datepicker.
you see u can enter alphabets in textbox of rad datepicker is there any solution to avoid this and allow user to only allow to enter numeric values??
0
Hi Sourabh,
If you want to completely disable entering date, add this setting: EnableTyping="false"
In order to disable just some of the keys you have to specify a function that will be called client-side when a key is pressed and to cancel it on the corresponding javascript.
For example for disabling letters add this to your mark-up:
Note that you can disable additional keyboard keys by using their ASCII code as showed in the example.(65-90 for capitalized letters and 97-122 for small letters).
I hope this helps. Good luck with your project.
Greetings,
Eyup
the Telerik team
If you want to completely disable entering date, add this setting: EnableTyping="false"
In order to disable just some of the keys you have to specify a function that will be called client-side when a key is pressed and to cancel it on the corresponding javascript.
For example for disabling letters add this to your mark-up:
- ASP:
<
telerik:RadDatePicker
...
DateInput-ClientEvents-OnKeyPress
=
"KeyPress"
>
- JavaScript:
<
script
type
=
"text/javascript"
>
function KeyPress(sender, eventArgs) {
var keyPressed = eventArgs.get_keyCode();
if ((keyPressed > 64 && keyPressed <
91
)
|| (keyPressed > 96 && keyPressed <
123
)) {
eventArgs.set_cancel(true)
}
}
</script>
I hope this helps. Good luck with your project.
Greetings,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Sourabh
Top achievements
Rank 1
answered on 30 Mar 2012, 12:31 PM
thanks Eyup
That helped, but i suggest that telerik team should add the feature of masked date-input in raddatepicker.
Sourabh
That helped, but i suggest that telerik team should add the feature of masked date-input in raddatepicker.
Sourabh
0
José Ángel
Top achievements
Rank 1
answered on 10 Feb 2015, 10:20 AM
Hi,
what is the best way in the current version to have a RadDatePicker with Mask? I think it's mandatory to have a simple property for this and not weird combinations of components and javascript.
Thanks
Ángel.
what is the best way in the current version to have a RadDatePicker with Mask? I think it's mandatory to have a simple property for this and not weird combinations of components and javascript.
Thanks
Ángel.
0
Hi Ángel,
Currently, the only control which provides masking functionality is RadMaskedTextBox:
http://demos.telerik.com/aspnet-ajax/input/examples/radmaskedtextbox/firstlook/defaultcs.aspx
You can use the EmptyMessage property as an alternative to hint the users for the correct format:
You can also log a feature request about this requirement in our public portal and our developers may consider adding them for the future releases:
http://feedback.telerik.com/Project/108
Regards,
Eyup
Telerik
Currently, the only control which provides masking functionality is RadMaskedTextBox:
http://demos.telerik.com/aspnet-ajax/input/examples/radmaskedtextbox/firstlook/defaultcs.aspx
You can use the EmptyMessage property as an alternative to hint the users for the correct format:
<
telerik:RadDatePicker
...>
<
DateInput
runat
=
"server"
EmptyMessage
=
"Month/Day/Year"
>
</
DateInput
>
</
telerik:RadDatePicker
>
You can also log a feature request about this requirement in our public portal and our developers may consider adding them for the future releases:
http://feedback.telerik.com/Project/108
Regards,
Eyup
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
bhargavi
Top achievements
Rank 1
answered on 15 Jun 2015, 01:52 PM
Hi, Raddateinput does not display entered value instead always displays mask.....
Please help me
0
Hello,
Could you elaborate on your specific scenario and send us the definition of the picker control?
Regards,
Eyup
Telerik
Could you elaborate on your specific scenario and send us the definition of the picker control?
Regards,
Eyup
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items