Open NoelOConnell opened 6 years ago
Hello, Noel :)
It seems very useful to set 15/30/45/60min!! There is someone that request the same feature(WoW) You can check this at #175.
Thank you
Thanks,
I took a look at how to change this setting.
In core.js the _calcGridYIndex
function returns a decimal which decides whether the event will be at 60mins or 30mins.
I replaced that function with this version:
_calcGridYIndex: function(baseMil, height, y) {
// get ratio from right expression > point.y : x = session.height : baseMil
// and convert milliseconds value to hours.
var result = datetime.millisecondsTo('hour', (y * baseMil) / height),
floored = result | 0,
nearest = common.nearest(result - floored, [0.25, 0.5, 0.75, 1]);
return floored + nearest;
}
It now returns a decimal to the nearest quarter. So the event can now be dragged to 15/30/45/60 mins. Hope that helps.
@NoelOConnell Thank you for your good suggestion. Can you send us PR please? Because it's your achievement for tui-calendar
. I'll really appreciate it.
@NoelOConnell will you open a PR ?
@matthiasg The edits I suggested above worked for me for my specific use case.
Currently the default is events in 30 minute blocks, changing that behaviour could effect existing implementations that relied on that.
A better option would be to this configurable so you could set at what minutes on the hour a time slot can start at. eg every 5 minutes or only every 15 minutes.
Also, my case raised some usability issues. When the default is every 30 minutes, it was obvious to the user what time was being selected. When the slots more frequent, it was very hard to know if you were selecting 1:10pm or 1:15pm etc. I made some more adjustments using the guideElement to highlight on hover, what the current time selected would be.
@NoelOConnell I was wondering about the usability aspect, would likely only be solved well by redefining the slot height and also adding some visual feedback like a popup to show the exact time.
Below is an example of the visual feedback I chose to give when hovering over time slots. The user can see what time would be selected. It's not ideal in all case but worked for me.
By default it highlights 30 minute slots but the user can click and drag to create larger time slots. Maybe a variation of the current time indicator might be better?
Hello,
I'm looking for this feature as well, really like the look of the hover on the 30 min time slots. Weirdly that's exactly what I need in my app. Do you think you'll be doing a pull request? If not, please, could you share you code?
I made the changes in a forked version so you can see what was required.
It was hacked together to get it working the way I wanted. More consideration would be needed to make it configurable before making any pull request.
Feel free to look at the changes and see how it works.
If you fork and run my version you can see the guide appearing when hovering and the ability to select events every 15 minutes
Hi, would you please consider implementing this in the main calendar, instead of a fork? It's very useful.
@mariusa I agree with you. TOAST UI Calendar v2.0 has been planning this functionality.
Hi, Our company is using the TOAST UI Calendar and we were wondering if there is an update on this functionality. Or when v2.0 will come out?
Thanks
Hi @dongsik-yoo , This feature would be fantastic. I am planning to use TUI Calendar for a doctor appointment booking app, and many doctors need a 45mn standard appointment. I am pretty sure many other businesses would benefit greatly from a configurable drag event. Is there an update? Happy new year
@johnnyBarendrecht , @gregoryforel Our team members are working on different projects...
2.0 will probably come out this year. (at all costs!)
I'm sorry for late reply.
Happy new year :)
Hi. Any update on this? Is the project still active?
@kino90 The project is still active as you can see. However, we don't have a plan to implement this feature yet.
Yes, I see the project is still active and I'm happy about that, it's a really nice project!
Why isn't that planned, if I could ask? Does it break something? Because that looks a pretty "quick and easy" feature from outside, and that could be very useful to many people!
@kino90 The team behind TOAST UI products is not developing TOAST UI only. So it's tough to share the roadmap in general. Please understand that.
On the other hand, I'll review the best I can when someone uploads a PR for a new feature. Or someone else can fork the repository and modify this project for their own use cases.
@dongsik-yoo , Hey team can i know the expected time for this feature to see in the release , actually we need this feature on a priority basis , it will be helpfull if we could see this feature in a week .
@NoelOConnell @mariusa @kino90 @gregoryforel
@mohitkota2003 (and others): it looks like PR #1426 implements this feature :smile: It should be possible to use it already, if you don't mind fiddling a bit with Git forks :slightly_smiling_face:
Currently when creating an event you can click on the calendar and create events on the hour or 30mins past.
Is it possible to create events at other times like 15mins past or 45mins past? Dragging an event only allows for events at the hour or 30mins past also.
Any suggestions on the best way to handle these cases? Thanks