将文本框中的日期设为阿拉伯语日期 [英] make the date in textbox as arabic date
本文介绍了将文本框中的日期设为阿拉伯语日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
这是我的文本框
< asp:TextBox ID = RecordBDate runat = server MaxLength = 10 >
用户输入dnd然后它已完成/然后用户输入mm并且它自动完成/然后用户输入yyyy
这就是这样做的结果
< script type = text / javascript >
function addSlashes(input){
var v = input.value;
if(v.match(/ ^ \d {2} $ /)!== null){
input.value = v +'/';
} else if(v.match(/ ^ \d {2} \ / \d {2} $ /)!== null){
input.value = v +'/ ;
}
}
< / script >
我想做的是用户可以在arabiclanguge中输入日期我能做到吗?
解决方案
/)!== null){
input.value = v +'/';
} else if(v.match(/ ^ \d {2} \ / \d {2}
/)!== null){
input.value = v +'/';
}
}
< / script >
我想做的是用户可以在arabiclanguge中输入日期我能做到吗?
阿拉伯语日历可能意味着Hijri日历: http ://en.wikipedia.org/wiki/Islamic_calendar [ ^ ]。
如果是这样,请参阅: http://msdn.microsoft.com/en-us/library/system.globalization.hijricalendar%28v=vs.110%29.aspx [ ^ ]。
-SA
hi all ,
this is my textbox
<asp:TextBox ID="RecordBDate" runat="server" MaxLength="10" >
the user enter dnd then it's completed /then user enter mm and it'sautocomplete / then the user enter yyyy
this is the fumction doing this
<script type="text/javascript">
function addSlashes(input) {
var v = input.value;
if (v.match(/^\d{2}$/) !== null) {
input.value = v + '/';
} else if (v.match(/^\d{2}\/\d{2}$/) !== null) {
input.value = v + '/';
}
}
</script>
what i want to do is the user can enter the date in arabiclanguge how can i do it ?
解决方案
/) !== null) { input.value = v + '/'; } else if (v.match(/^\d{2}\/\d{2}
/) !== null) { input.value = v + '/'; } } </script>
what i want to do is the user can enter the date in arabiclanguge how can i do it ?
It's possible that by "Arabic calendar" you mean Hijri calendar: http://en.wikipedia.org/wiki/Islamic_calendar[^].
If this is so, please see: http://msdn.microsoft.com/en-us/library/system.globalization.hijricalendar%28v=vs.110%29.aspx[^].
—SA
这篇关于将文本框中的日期设为阿拉伯语日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文