I'm using the Calendar and DateBox components from DevExtreme.
My current language is set to pt-BR.
As shown in the image, the months descriptions are like "jan." but I'd like it to be "Jan".
Looking for some samples/demos on the internet (example1 or example2), the description as "Jan" is the default behaviour.
The code I'm using (the simplest):
Html.DevExtreme().DateBox()
.Type(DateBoxType.Date)
As a result of this, I'm trying to use DisplayFormat as "MMM/yyyy" and it makes the description like "jan./2021" and not "Jan/2021" as I'd like to.
Is there a way I can change this behaviour?
Try with "MM/yyyy" instead of "MMM/yyyy", it should work
Related
I don't want to use the time field in Google Forms, and have tried to create a RexEx like this:
[\0-24]{2}:[\0-59]{2}
It accept "21:35", but rejects input like "07:35" og "17:35".
Any idea why it behave like this?
This is the RegEx:
[0-2]{1}[0-9]{1}:[0-5]{1}[0-9]{1}
Source: https://www.regextester.com
I'm working on a website with a feature that can sort users.
I'm using mvcgrid.net libs but I can't figure it out. the toolbar doesn't work.
I used most of the basic source codes from mvcgrid.net but when i press something in the search bar it doesn't work or the items per page selection.
If you have specific code to take a look at, please post. Otherwise, here are a few things you can check:
(1) Be sure you've applied the mvcgrid data attributes needed. For example, for a search field you might have these attributes:
<input
type="search"
data-mvcgrid-apply-additional="change"
data-mvcgrid-type="additionalQueryOption"
data-mvcgrid-option="search"
data-mvcgrid-name="ContactGrid">
(2) Be sure the value you chose for mvcgrid-option (in this example, "search") is then added when you configure the grid. For example:
MVCGridDefinitionTable.Add("ContactGrid", new MVCGridBuilder<ContactViewModel>(defaults)
.WithAdditionalQueryOptionNames("Search")
...
(3) You then need to read the attribute (again in the grid config) in your .WithRetrieveDataMethod()
string search = options.GetAdditionalQueryOptionString("search");
I've forgotten step 2 in the past -- that's generally what has tripped me up.
I can see a good aggregation chart under "Discover" tab http://goo.gl/zzzQ6u, but when I click the "Visualize" and will see a wrong wording bar chart as http://goo.gl/38JhVc.
The X-Axis is supposed to be like "SM-G7102", "HTC One_M8"...
Does anyone know how to display correct wording ?
Your field has been "analyzed" by ElasticSearch (that's its job). You want the non-analyzed version of the string. Logstash makes you one for each field, available as field.raw.
Change your visualization to use that field.
I’m using Kentico v7. I’m using the Smart Search Results widget and I’m using the built-in transformation to render the HTML (Document Types -> Root -> SmartSearchResults (ASCX type). I noticed that transformation is using the “Created” date, but we would like to see the “Last Modified Date”. I’ve looked into how to obtain the last modified date rather than the created date, and I see that it is quite involved.
I’ve evaluated the CMSModules\SmartSearch\Controls\SearchResults.ascx.cs control and have seen that it calls into a SearchHelper class and into a method of Search(). I was able to evaluate this method and see that the logic is quite complex in retrieving the data.
What approach can I do to change the date to “Last Modified” instead of the “Created” date?
(I realize this is a very specific Kentico question)
You should be able to do this by adding the following into a transformation
<%# GetSearchValue("DocumentModifiedWhen") %>
This can also be used to get other values of the searched document.
I'm currently working on some DateTime properties in a PropertyGrid in c#.Net. Im using the default drop-down datetime picker.
My question: Is there any way to show the full date with the time? By default the date is shown if no time is set, but I want zero-values aswell. I.e: I want "09.11.2009 00:00" to be shown instead of "09.11.2009".
Do I have to use some custom TypeConverter or Editor for this?
I feel so lost in this propertygrid and it makes me sad...
Any help would be appreciated! Thanks :)
Yes, you need your own TypeConverter. Derive it from DateTimeConverter and override the ConvertTo method. If you look this method in Reflector you will see this piece of code inside:
if (time.TimeOfDay.TotalSeconds == 0.0)
return time.ToString("yyyy-MM-dd", culture);
Just remove that for example.
Nicolas