Comments (5)
点击确定和取消按钮的时候可以这样操作
$(document).on("touchstart",".lcalendar_finish",callback) 在callback中处理就可以了。
from lcalendar.
能具体一点么?
from lcalendar.
这个只能添加监听事件,进行处理。我看了下这个插件的源码,里面封装了".lcalendar_finish"这个样式作为按钮的样式。所以要在这个样式上添加监听事件,$(document).on("touchstart",".lcalendar_finish",**callback**)
这样就为这个样式添加了监听‘touchstart’(因为原框架中点击按钮的时候调用的是这个事件)。这样在自己选中日期点击确定按钮的时候,就会执行自己定义的callback方法,callback方法里面自定义自己取值的function就可以了。我自己的代码如下:(我使用的vue2.0框架)
$(document).on("touchstart",".lcalendar_finish",this.initDateInputVal)
initDateInputVal : function (){
let _self = this;
_self.beginTime = $("#start_date").val();
_self.endTime = $("#end_date").val();
_self.page = 1;
_self.npInfoList = [];
_self.$nextTick(() => {
_self.$refs.infiniteLoading.$emit('$InfiniteLoading:reset');
});
}
from lcalendar.
非常感谢,
像这种,用datetime怎样把时分放到后面显示,不想用单独的date和time控制,这样加好多判断来判断用户选取的时间
from lcalendar.
这个我没用过哦。非常抱歉。不过我建议你分开控制。
from lcalendar.
Related Issues (20)
- 改写了一下原作者的代码,一起交流一下咯! HOT 1
- 在苹果手机上正常显示,但是在安卓手机上调不了日历插件
- 时间选好后,确定,再点时间选择,点取消,选择的时间能消失吗?
- 按照您之前告诉别人的这个方法,点击确定只能获取年分,怎么获取月份呀?!
- Uncaught TypeError: Cannot read property 'querySelector' of null HOT 2
- 提示rs is not define
- 一个bug HOT 1
- 移动端rem支持(自问自答)
- 不支持require吗? HOT 1
- 这个怎么取值 HOT 2
- LCalendar.js 文件102行变量未定义
- 在苹果手机上不能正常显示,在有些安卓手机的微信浏览器上调不了日历插件 HOT 2
- 和vue似乎有冲突 HOT 2
- 日期选中后,如何获取值呢? HOT 4
- 没有秒? HOT 4
- 如何在重置时间节点个数时,指定范围 HOT 1
- 感谢作者提供的源码,在这个基础上添加了一些功能 HOT 1
- 设置最小日期为下个月,就会出现时间选择在12月份的情况 HOT 1
- 点击时间确定按钮有没有回调方法? HOT 3
- LCalendar 日期选择插件如何动态指定最小日期?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lcalendar.