Start 你好,可以通过 OnClientDateSelectionChanged 和 FpSpread1_UpdateCommand 在后台获取选择日期:
前台代码:- function datechange() {
- FpSpread1.UpdatePostbackData();
- FpSpread1.CallBack("Update");
- }
复制代码 后台代码:- protected void Page_Load(object sender, EventArgs e)
- {
- FarPoint.Web.Spread.Extender.DateCalendarCellType dc = new FarPoint.Web.Spread.Extender.DateCalendarCellType();
- dc.Animated = true;
- dc.DateFormat = "MM/dd/yyyy";
- dc.EnableOnClient = true;
- dc.ShowEditor = true;
- dc.OnClientDateSelectionChanged = "datechange";
- FpSpread1.ActiveSheetView.Cells[0, 0].CellType = dc;
- }
- protected void FpSpread1_UpdateCommand(object sender, FarPoint.Web.Spread.SpreadCommandEventArgs e)
- {
- string datetime = e.EditValues[0].ToString();
- }
复制代码 |