日期增量问题 [英] date increment problem

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

问题描述

当使用ajax从日历中选择日期并在文本框中显示时,我希望另一个文本框显示日期后的一天。

怎么办?

when select date from calendar using ajax and display it in text box i want that another text box show the one day after date.
what to do?

推荐答案

在文本框中显示我希望另一个文本框显示日期后一天

定义日历或第一个文本框的onchange方法。在这种情况下,根据需要设置第二个文本框的日期/值。试试!
display it in text box i want that another text box show the one day after date
Define onchange method for calendar or the first textbox. In this event, set the date/value of the second textbox as desired. Try!


DateTime dt = myCalender.SelectedDate;
dateText.Text = dt.ToString();
datePlusOne.Text = dt.AddDays(1).ToString();


这篇关于日期增量问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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