Attempting to create a calender with a clock picker built into each day as an ng-click - javascript

I understand that this sounds a bit far fetched but i want to build a monthly calendar that when the day is clicked it is routed to another page that then prompts the user to put in a start and end time which the program then calculates the total amounts of hours and assigns it to the original calendar. I have found a few j query plugins however when combined or any of their code is manipulated they both seem to break. If you have any suggestions anything is welcomed. I can upload what i have for code so far but its not really flushed out or good at all.

Related

Static Calendar of current month to show in PDF report

I need to show a static calendar in pdf having current month dates.
The dates will have different icons as per the condition from database table column values. The requirement is to send a report to end user every month in form of PDF having current month dates.
Please help me to choose which language/technology can assist in creating such a PDF. Will .net , jquery can help to build such web form or web-page which can then be converted to PDF. Is there any similar demo project available online. I have searched a lot but maybe my keywords are not assisting in getting the right direction.
I have attached the image of calendar which needs to be shown in PDF.
Thanks for all
I have achieved the goal by using iTextsharp and was able to create Calendar having different cell events as per my business logic to have different images.
The link helped me to create a calendar which then I manipulated to have my custom cell events Creating a Printable PDF Calendar
calendar in pdf
Hope this helps anyone who want to achieve similar requirement.
https://jsreport.net
This seems to satisfy your needs exactly
Didn't try it though.
P.s.
Would have commented this.

FullCalendar does not display past events. How to store lastCreatedEvent date?

Whenever i insert an event and that day passes it just disappears from my calendar. I have a different page where i load all the events and they're still there so they are not being removed from the database.
There must be a check somewhere in the FullCalendar code which makes it that it doesn't display dates < $today. I have no clue on where to start looking, is there anyone who had the same problem as me? How did you manage to fix it? Thank you for reading my question.
Also, how would i go about storing the last created event day? For example, i want to create a function which brings the users to my event created in August instead of today's date.
$('#calendar').fullCalendar( 'gotoDate', LASTCREATEDDATE );
I need it to update whenever somebody creates a new event.
I looked for different functions on how to achieve this but i'm not quite sure how to do this.
Your problem is that you are not getting the right events to be showed.
As you can read here FullCalendar is going to send the following URL to the server:
/myfeed.php?start=2013-12-01&end=2014-01-12&_=1386054751381
So you have to select from your database the events which EventStartDate <= end && EventEndDate >= start
About your second question you should use something like SignalR or WebSockets if you want the calendar of your users to be updated as soon you create a new event.

What is the best solution to check if dataset has been changed (added / edited ,deleted records)?

I'm working on a project where the user has to be able to add or edit hours that he will work or worked. The dataset I'm using for this I retreive from ASP.net / MVC 4. What is the best way to check if the user added new data to the table or edited some data?
Example: The user loads the page, the calender is set to the current date --> table shows 3 weeks. Previous week, this week and next week. The dataset load in the hours that were retreived from ASP.net. The user adds new hours and edits some hours. Then the user clicks on the button to go to the next week. The data entered by the user has to be compared with the retreived dataset. The dataset has to be saved, this will happen in ASP.net. But after the save the browser gets the data of the next week and the calendar has to be for the next week.
The data added / edited by the user has to be saved but I have to know if this is edited or added. What is the best way to do this?
The retreived dataset = a string? Could I compare this by just comparing 2 strings? remove enters, spaces, ...
Is there a library to compare datasets in jquery?
To show the next week I think the page cannot be refreshed? Correct?
Any other suggestions are welcome.
I'm not quite sure on what you're going at here, however a suggestion might be to either have a save button on each page or hook up a event for whenever the input looses focus (or whatever you're using for selecting hours etc).
For the latter suggestion it would require more javascript, for example each input that's rendered could have data attributes of which year, month, and day it represents so it can be used when posting a change.
If you however prefer to submit the whole "dataset", you should checkout modelbinding if you're not already fimiliar with it, then either post the collection when clicking save or changing page.
Scott Hanselmans article on how the default modelbinder works might be of any help.

Planning tool JQuery / MVC 4

The webapplication I would like to build gives the user the possibility to select a period on a calendar. On the selected days they can write the start and end hour. The total amount of hours gets calculated. On the image below you can see what I would like to accomplish. What is a good way to get started programming this? Is there a good tutorial to get me started?
Is there a JQuery widget that gives a good start?
On the left you got some Employees and for each of them the user can select the period and fill in the hours they have to work.
I hope u get the idea that i have in mind. Please feel free to ask me any specifications.
I'm using MVC 4 - razor pages for the webapp
Thanks in advance
I've made something very similar in a MVC2 app with jQuery to check schedules for formative actions.
I first place a temporary span for the action and load it into the calendar provided by jQuery's datepicker, later I overwrite it's onSelect event to affect and save my data.
So when I click on a day of the calendar (only days on the previously selected time span are clickable) I allow user to introduce data for the schedule on that day.
Data saving to server is managed through AJAX calls that saves during using interaction.

Date/Time input for an HTML Form

I'm having trouble finding an elegant way to allow for date/time input in an html form. I am thinking of having drop down menus for year, month, day, hour, minute, second, millisecond that are populated with valid entries only. I could do this by hard coding values for each drop down menu, but I'm thinking there must be a more elegant way to do this, perhaps with some already existing javascript library that I have not found yet. Any tips for getting this done?
edit: Second, and if possible, millisecond precision is needed for what I'm working on.
edit#2: After reading some of the comments, I have come to the realization that it is probably a bad idea to have drop down menus for the large range of values required by hours/minutes/seconds and especially milliseconds. I think will go with having the DatePicker prototype date chooser, along with a simple textfield for time input.
This can be done quite elegantly with a Jquery plug-in called Datepicker
There are many calendars which can do this, with both date and time :
Calendar Date Select
Control.DatePicker (based on PrototypeJS) my favourite, I made an enhanced version, with more features, I can share it
Dynarch calendar but I find it too heavy
and others
I think a very easy way to do this is by using PHP i.e. for making choosing a day and a month:
Use the select command for the form, then insert a PHP line to initiate a for loop. So for the days the loop would go from 1 -> 31 and for the month from 1 -> 12. So instead of hard coding it for all the days months etc, you can neatly fit it into one line of code with a small bit of PHP added.
You could expand on on this plugin since you want second/millisecond
http://www.jnathanson.com/index.cfm?page=jquery/clockpick/ClockPick

Categories