I am filtering my csv data on a simple comparison of d3.csv loaded data with jquery datepicker data.
I'm able to do it finally, except one very silly problem, I am not able to match single digit dates because of them being in different formats as shown below :
11/09/2015 & 11/9/2015
My codes for loading dates :
date= d3.time.format("%m/%d/%Y").parse(d.date) //D3 csv loader
dateFormat: 'mm/dd/yy' //jquery UI
How do I go about fixing this small issue? CSV can't change the date loading format, nor can D3. The only option leaves us to mess with jquery-ui datepicker here
Any ideas/approach on fixing this issue will be highly appreciated
Related
Though there are various good datetime pickers available, I'm looking for a single component which has all these following features -
Date and time selection in one go
Only date selection
Only time selection
Multiple dates selection (Not to be misunderstood with date range selection)
I'm unable to find a component which has all the above. The reason behind I'm looking for a single component instead of using multiple components is consistent UX and optimum performance.
Here's one built off of ngBootstrap. The ngBootstrapCalendar control supports multiple date selections.
https://stackblitz.com/edit/angular-datetimepicker
I use php and dynatable.js (version 0.3.1) to create dynamic tables with a sort and search function. This setup works very well even with the U.S. formatted date from the SQL database. But I need the german date format in the table (dd.mm.yy or dd.mm.yyyy) to sort the entries.
I can't find a solution for my problem in the documentation from dynatable.js. Has someone had a similar problem with the date format in dynatable and maybe a hack or other kind of solution?
I know there was a lot of discussion about datetime parsing in dygraphs and problems with Javascript. But still, I have a problem how to correctly pass datetime.
I'm using dygraph to show data (points with 5 seconds interval) and it's crucial to have correct datetime. But if I pass datetime as timestamp (1401580800) or as ISO 8601 (2014-06-01T00:00:00+00:00), I always get datetime modified to my local time.
My question is, how to correctly pass the datetime to dygraph so datetime doesn't change?
Dygraphs use Javascript Dates, which display according to your local timezone (unfortunately, there's no way to display them using an arbitrary timezone).
One solution is to modify the data - I've encountered a similar problem in my own work, and I made a small helper function to make fake Javascript UTC dates (basically ending up with a Javascript date that's actually the wrong time but shows up looking correct when displayed in local time). This worked for my application, which used moments (http://momentjs.com/) to represent dates everywhere unless required by some other library to use Javascript's Dates.
Another (probably more correct) solution is to modify Dygraph's functions to display the right things, as demonstrated in the answer to this post: Dygraph showing dates in an arbitrary Timezone
The JavaScript Date object will always use the local time of the computer it's running on. If you don't want that behavior, you'll need to use something else. Consider building a pre-formatted string using something like moment.js and then just pass the string to dygraphs instead of the date.
This may be a dumb question with an obvious answer but i can not find or figure out a solution. So I have an excel sheet with 5 tabs, each tab with different data. I've added a filter on the tabs and with some of the date fields it groups by date (you can choose year and month) when you select the drop down. But on others it doesn't. How can i get it to give this grouping option on all of the dates????
Thanks
my best guess is that all the dates in the other tabs might be stored as text and if so, you can convert them back to the date format by copying 1 and pasting as Multiply (Paste Special > Multiply) to all the dates.
I am using the jquery mobile datebox at http://dev.jtsage.com/jQM-DateBox2/demos/fullopt.html In particular I am using the calbox option at http://dev.jtsage.com/cdn/datebox/1.1.0/jqm-datebox-1.1.0.mode.calbox.js
How can I iterate through all days shown on the calendar and get the date in the format "YYYY-MM-DD"? It is easy to get the day only since that is being shown so you can extract it from the dom - but is their a way to get the year and the month portion as well?
Thanks!
you could look at
$('element').datebox('getTheDate')
but that would give you an incorrect month/year for the "other" months dates. What's your intended purpose, maybe there is a better way to go about it? (Or, if you have a compelling use case, maybe it's something that needs to be added...)