问题描述:

laydate显示日期时提示:日期格式不合法

//渲染日期
laydate.render({
    elem: '#txtBeginTime',
    type: 'datetime'
});

【LayUI】laydate.render报错:日期格式不合法

解决方案:

格式化日期,与laydate格式保持一致

this.txtBeginTime.Value = dtSeckill.Rows[0]["BeginTime"] is DBNull ? "" : Convert.ToDateTime(dtSeckill.Rows[0]["BeginTime"]).ToString("yyyy-MM-dd HH:mm:ss");

 

相关文章:

  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
  • 2021-05-04
  • 2021-12-13
  • 2022-12-23
相关资源
相似解决方案