进一步的日期选择被禁用 [英] Further date selection is disabled

查看:114
本文介绍了进一步的日期选择被禁用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有日期选择器&文本框。文本框中填充了当前日期n日期选择器中禁用了更多日期选择。当Web应用程序部署在服务器中时,文本框显示服务器日期,但是日期选择器选择客户端机器日期作为最大日期。



如何将日期选择器最大日期设置为服务器date.Please帮我。

I Have date picker & text box. Text box is populated with current date n further date selection is disabled in date picker. When web app is deployed in server, text box shows server date, but date picker picks client machine date as max date.

How to set date picker max date to server date.Please help me.

推荐答案

这是正确的行为。相反,在你走得更远之前,我建议你理解客户端和服务器编程之间的区别。这里有一个很好的主题:



http://programmers.stackexchange.com/questions/171203/what-are-the-difference-between-server-side-and-client-side-programming [ ^ ]



回到你关于将客户端上的最大日期呈现为服务器日期的问题。您实际上可以使用 RegisterClientScriptBlock [ ^ ]将JavaScript变量设置为服务器日期的方法。稍后在客户端代码/日历等中使用此变量值。



请查看本文,了解如何在客户端使用服务器端代码。



http://manasbhardwaj.net/accessing-c-variables -in-javascript / [ ^ ]



免责声明:链接指向我自己的帖子。
That's the correct behavior. Instead, before you go further I would suggest you to understand the difference between Client and Server programming. Here a good thread about it:

http://programmers.stackexchange.com/questions/171203/what-are-the-difference-between-server-side-and-client-side-programming[^]

Coming back to your question about rendering the max date on client as server date. You can actually use the RegisterClientScriptBlock [^]method to set a JavaScript variable as the server date. Later use this variable value in your client side code/calendar etc.

Look at this article on how to use Server Side code in your Client Side.

http://manasbhardwaj.net/accessing-c-variables-in-javascript/[^]

Disclaimer: Link points to my own post.


这篇关于进一步的日期选择被禁用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆