Angular bootstrap datetime picker - angular-ui-bootstrap

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

Related

How to create a custom filter using a user input control in Google Looker Studio

I have a table of events from google sheets that I want users to be able to filter by date in Google Looker Studio. The events have various lengths, so each has a start and an end date in the table (as well as a bunch of other columns). For example:
Event
Start Date
End Date
A
02/15/2023
02/20/2023
B
03/01/2023
04/30/2023
C
02/23/2023
03/01/2023
I want users to be able to filter for anything that is happening in the event range they select. For example, if they input the date range 02/26/2023 - 03/15/2023, the table should filter down to show events B and C, since those have ranges overlapping their input data range.
I've tried a few different approaches that all have drawbacks:
Using the Looker Studio date range control. This seems to only filter based on the Start Date OR the End Date, and not have the ability to look at both.
Applying a Date Filter in the chart. If I apply the following filter (under Chart - Filter - Table Filter), it works great to show anything overlapping the desired date range:
Include - Start Date - Less than or equal to - 03/15/2023
AND
Include - End Date - Greater than or equal to - 02/26/2023
However, I had to put these dates directly into the filter, which is not what the user should have to do. Is there a way I can have them input the date range they are interested as a control, and I can feed that information into the Date Filter above? (So they would put in a start date and end date that would replace where I have hard coded 02/26/2023 and 03/15/2023 above).
I have also set up this filter in Google Sheets to work exactly as I want it. Anyone can enter a start date and end date in a couple cells, and I use the filter() function with the same logic as in #2 above to filter the table down to what I want. The disadvantage of google sheets though, is if multiple people are there at the same time, they do not have their own view of the report. I switched to Looker Studio because it allows view-only users to filter their report independently.
Edited to add: This report is intended to be used by viewers with limited experience using google sheets or looker studio, and possibly on phone or browser, so I'm trying to make the filtering as easy as possible.
the ability to filter data independently & at the same time for multiple users is natively possible in google sheets with Filter Views:

Splunk Enterprise: Exclude certain time ranges for a bigger time range

I am in need of knowing if there is a possibility to exclude certain time ranges within a given time period? I have a formula for my search and then I have chosen the datepicker, but would like to know if I can filter out specific time ranges within what I already have chosen?
Or is the only way out to make multiple searches from the datepicker menu?
Thanks a lot
The way to filter time the way you're describing is by putting it directly in your SPL instead of using the time picker using earliest and latest
For example:
index=ndx sourcetype=srctp ((earliest=-24d latest=-20d) OR (earliest=-10d latest=-6d)
| <rest of SPL>

How Calculate change rate over time with tabular dataset in google data studio?

I seek your valuable support in finding a way to calculate change rate over time with tabular dataset in google data studio. Here is the link to the dataset: https://docs.google.com/spreadsheets/d/1To1n5JJA6uVkLMgwjKhghJgCJpFmtXkqNog4DzfoEbE/edit?usp=sharing
There are many rows with data stamp and have different categories and sub categories. I have created a change rate table manually based on which I want to create charts in google data studio. The charts will be from the raw tabular data not the separate change rate table that is built only for example purpose.
So the chart could be based on a main category (as in the sample) and can also be viewed as sub-category and show change rate over time between the dates.
The dates can sometimes be months or years. I am not very savy with advanced formulas or scripting but I am hopeful someone here would be able to help me out on this. I will be ever so grateful for this :)
I can only provide you with the quotient of datasets between two days. If you need different mappings between dates (day, months, years), for each the following steps have to be done:
generate a new field "yesterday" with: DATETIME_SUB(date, INTERVAL 1 day)
blend this dataset with itself, using as dimension "date" and "yesterday".
Further dimensions are your categories fields A and B.
As metric, you can use the count of the date field.

How best to store and convert dates and times in .net core booking system?

I'm writing a room booking system in .net Core 2.0
I have StartTime and EndTime stored as DateTime variables, but the built-in HTML datetime field is clunky and rather user-unfriendly, so I want the values to display on the page as a date field and a time field.
But I'm wondering what the best way of implementing this is. Should I:
create some readonly variables within the model (can I do this without creating database fields?)
create the separate form fields (with jQuery datepicker) and then use JavaScript to write the values of the inputs to hidden fields which store the full DateTime?
(NB I haven't chosen to change the database fields because it is conceivable that a booking might run past midnight. The JavaScript would assume that an early hours endtime is the next day. )
First and foremost, use DateTimeOffset instead of DateTime for your database-backed date/time properties. Whether you end up storing the values in UTC or local time, as long as you have the timezone, you can get to whatever other locale you need. Trust me, this will be invaluable in the long run.
As far as editing goes, make your inputs datetime-local types. This isn't actually supported by any browser, but it at least carries more semantic value and who knows, maybe one day browsers will finally get off their collective hind-quarters and do something with it. Breaking it out into separate date and time fields is tempting, so that you can take advantage of built-in browser controls, but it's clunky and prone to error. Use a JavaScript library that provides a good date and time control to progressively enhance the input instead. My favorite at the moment is air-datepicker. It's lightweight, supports all sorts of scenarios and configuration options, and it's localized.

Selecting date and time with a datepicker for the date but with time immediately visible in Rails

I'm using Rails 4, and also Twitter Bootstrap.
I'd like to select the date with a date picker, but have a separately visible component for selecting the hour and minutes.
I've had a look at smalot bootstrap-datetimepicker https://github.com/smalot/bootstrap-datetimepicker , but looking at the Demo Page, they don't demonstrate any ability to show date and time separately. You have to choose date, and then later on choose time, which doesn't feel very intuitive.
I've also looked at Eonasdan bootstrap-datetimepicker https://github.com/Eonasdan/bootstrap-datetimepicker , but the time picking for it, even in inline mode, is not intuitive - will people know they can just click on the hour value to change it?
I'm thinking of just using a date picker for picking the date, and selecting the hour and minute myself, but it kind of feels wrong handing off part of a datetime to a gem/library and handling the rest of it myself.
I came across Separate date and time form fields in Rails , which is asking about this kind of problem, but it's a question from September 2010.
How do I select the date with a date picker, but have simple and immediately visible selection of time?
First, unless you find a plugin that does what you want off the rack, then yes, it's up to you to handle it, and yes, it feels kinda wrong - depending on how you do it.
Not sure what you had in mind, but the way it feels "the most wrong" is if your form has a single "date time" field under the hood, and you use javascript to botch together the date from the plugin and the time from your own setup, and store them in your datetime field. The nice thing about this is your rails app just gets a single datetime field and knows exactly what to do with it.
Here's how I'd approach it:
Keeping in mind that forms don't necessarily have to map 1-to-1 with your models, I'd split it in the controller layer, and conceptually think of "a form with two fields: date, and time", and then in your controller (or a form object, which is probably better for this situation) you'd stitch the date and time together, before saving them to your model. This approach means you can have separate validation on each field, which is probably also what you want (because I'd assume it's possible for users to input a valid date, but an invalid time or vica versa).
In terms of handling the date with a plugin and the time yourself, that's now fine - they're two completely separate fields from the perspective of your form, so there's nothing dirty about it. It just means you need the extra logic in your controller layer to split the datetime when you display the form, and merge the date and time back into one when you save the form.
Edit: if you haven't heard of form objects, check out https://github.com/apotonick/reform and http://railscasts.com/episodes/416-form-objects

Resources