|
somehow weired. Is the code correct?
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
What code? My little two lines of JS that fix things? There is no other code involved in this problem.
|
|
|
|
|
Brady Kelly wrote: I don’t know how other browsers present date and time pickers.
Can I use... Date and time input types[^]
<input type="date"> - HTML | MDN[^]
IE, Firefox and Safari currently don't support them at all. Support is apparently being added in Firefox 57.
Brady Kelly wrote:
$(".date-picker").attr("type", "text");
That's going to break in old versions of IE - v8 and earlier, IIRC. If you need to support those older versions, you need to replace the <input> element, rather than changing its type .
Brady Kelly wrote: When I click on one of my date-picklers, I get a history dropdown of recently used dates,
Sounds like you need to disable autocomplete. Add autocomplete="off" to the attributes:
@Html.EditorFor(m => m.YourDateField, new { htmlAttributes = new { autocomplete = "off" } })
It would probably be easier to create a custom editor template for DateTime values:
ASP.NET MVC display and editor templates - Growing with the Web[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks for all the info. I suppose I should test on more than just Edge and Firefox, but it's a hobby project.
I don't care if anything IE8 or prior breaks, so replacing the type is good for me, but the best is the autocomplete. I never knew there was such and attribute, thanks.
It has crossed my mind several times to use a template, but I want to get the rendered HTML correct first.
"'Do what thou wilt...' is to bid Stars to shine, Vines to bear grapes, Water to seek its level; man is the only being in Nature that has striven to set himself at odds with himself."
—Aleister Crowley
|
|
|
|
|
|
PIEBALDconsult wrote: How am I supposed to check my lottery numbers?
Why are you playing the lottery in the first place?
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
It's been so long since ASP.NET MVC is in place in people still struggle to turn off yellow screen of death in production
|
|
|
|
|
Darn you to Yuma!
I have been doing some work with Extension Methods for Regular Expressions in .net this week.
One in particular can be used like this:
MatchCollection m = somestring.Matches ( somepattern ) ;
This works fine. The method instantiates a Regex object for the specified pattern and returns the result of Matches ( somestring ) . I've been using this for a while now.
Buuut... today I discovered that the MatchCollection and Match classes don't provide access to the Regex object that produced them! Which means I can't iterate the group names -- only the Regex class provides the GetGroupNames() method. (They both have private a field for the Regex .)
Regex.GetGroupNames Method (System.Text.RegularExpressions)[^]
So, when I need to iterate the group names, I can't use my Extension Method.
|
|
|
|
|
You could download the .NET core source code and fix it
|
|
|
|
|
Yuma.... how cruel your judgments.
|
|
|
|
|
PIEBALDconsult wrote: So, when I need to iterate the group names, I can't use my Extension Method.
Why not?
Match theMatch = ...;
foreach (Group g in theMatch.Groups)
{
Console.WriteLine($"{g.Name}: {g.Value}");
}
Match.Groups property[^]
Group.Name property[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Version Information
Available since 4.7
No use to me.
|
|
|
|
|
What, you mean you don't upgrade to the latest version the second it's released?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
|
Seeing the same thing in Chrome on a Mac
|
|
|
|
|
Same on Firefox - I think it's the "forum action" div that's causing the problem:
<div style="margin-top:-70px">
<div class="forum-action">
...
</div>
</div>
Reported as a bug[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Funny you mentioned it. I noticed it earlier in IE...looks correct now!
At any rate, a good chance to freshen up a forum that can get pretty stale!
"Go forth into the source" - Neal Morse
|
|
|
|
|
jsc42 wrote: Admittedly, this is on MS-Edge It's an Edge case, obviously.
|
|
|
|
|
public bool GetName { get; set; }
Marc
Latest Article - Create a Dockerized Python Fiddle Web App
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
My name is True (when I'm almost channeling Elvis Costello), so that's a bit of luck.
|
|
|
|
|
But your name is Stewart, not Alison.
|
|
|
|
|
Better get set for the name?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
It's obviously intended to hold the name of your offspring or lineage[^].
Or possibly the name of the git[^] who wrote it.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I'm assuming that, since it returns a bool, it will throw an exception if no name is present? Otherwise it would have returned a nullable bool ofcourse.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|