I'm trying to use jQM-DateBox with data-option timebox in Force Clock Mode, to have a 24h range of hours, as shown here:
[enter link description here][jQM-DateBox Time]
I've simply copy pasted the code in my app
<label for="mydate">Time </label>
<input name="mydate" id="mydate" type="date" data-role="datebox" data-options='{"mode": "timebox", "overrideTimeFormat": 24}'>
and it still keep showing me AM/PM mode.
Anyone else noticed this behaviour? Any idea how to resolve it?
Note that in the link above (same code!) everything seems to work properly, and I have no other problems with other jQM-DateBox Mode.
Thank you.
You'll need to override timeOutput too - i.e. "overrideTimeOutput":"%k:%M"
To be perfectly honest, I don't remember why I stopped doing the auto-switching - I think when I realized that the time output changes from locale to locale (if you are writing for a single locale, this is the easier way to handle it). Otherwise, my assumption was that you'd need it in the format that the server expected, in which case you'd want to override it anyways.
#J.T.Sage I meant the picker shows 12hr mode anyway
To anyone: I'm Italian so i "risolved" downloading this .js file Italian .js script for timebox
and changing timeFormat: 12 statement with timeFormat: 24.
It's a trick, but it works.
Bye, thanks.
Related
when there is some error in view, L4 shows a nice trace, but cached filename:
open: /var/www/webpage/app/storage/views/1154ef6ad153694fd0dbc90f28999013
howto during view-rendering-to-cache save view's path/name (in a comment or something)?
Or better yet - to show it in the debug-error-page (its called whoops or something?)
Thanks ;)
I don't know how to de encrypt view names , but one method i do is to
{{dd('will you reach here ')}}
Trying to move this line from view to another to watch where php render reach .
I know it is not the right way nor the professional one , but it may help in some cases .
This is not exactly a problema, this is a compiled version of your view.
Laravel Blade System will compile all your views and subviews into a single file and, if you didn't change anything on them it will always try to use the compiled version, to speed up your system.
Sometimes is hard to know wich one of our views is related to that error. Using Sublime text, what I do is to hit CTRL-P (windows) and paste the number of the compiled view (1154ef6ad153694fd0dbc90f28999013) and it will bring it to me right away.
Of course, you won't do any changes on it. This is just way to find the view you have problems in, so you can then find the real file and fix it. If you know wich file is the problematic one, you don't have to do this, go directly to your file.
One way to tackle this problem is add a html comments (not blade ones as they will not be rendered in compiled view) in sections which get echoed.
#section('content)
<!-- FILE: app/views/main/index.blade.php -->
<Your Content Goes Here>
#stop
This html comment will get rendered in the compiled source of the view. Of course you will have to inspect the compiled view first to identify which view is the problematic one. But in my experience, this method work almost all the time.
I created a helper that checks to see if you are working locally or in development mode, It then outputs an HTML comment.
{{ printViewComment('mockup/reports#content') }}
<!-- Template: mockup/reports#content -->
I chose to name the comments like this path.file_name#yeild_name but I only wish this was an automated featured.
I found my answer after looking into source,
when on the Whoops! page, just look for render in the sidebar, there will be the name of the view file...
I'm not sure whether this is a bug or not, so I'm just going to ask this. I created a view (and block) with a 'Comment: Post date' field with 'Time ago (with "ago" appended)' as Date format. I didn't fill in a custom date format.
Everything is previewed perfectly, but when I go to my dashboard, I only see the "ago": the actual numbers (hours, minutes, seconds...) aren't displayed.
I cleared caches, but nothing happened. I'm still using the default Seven 7.23 administration theme for my dashboard and I didn't set a custom template file or anything else. I just created the view.
How can I solve this?
Edit: I exported my view, so you can read the code here.
Try clearing your cache in drupal. Admin > Configuration > Performance > Clear All Caches
(/admin/config/development/performance)
I noticed you said you added Comment: Post Date. If you did not mean to display the time of comments on the node then my guess is that would be your issue. If not comments exist, you have nothing to get the last time.
If you wanted to get the last time of the save for the node then you will need to switch to last updated to fix your issue.
Edit: It seems odd to me that everything is working in the views preview section but not on the actual page. This leads me to think it might have something to do with the user you are viewing it with. Are you logged in when you test it, or are you opening it in a different browser on a new session? Check the user permissions for your content field type and make sure "can view" is checked.
I don't know what causes the problem, but I solved it temporally. I changed the Date format to 'Time ago' an added the 'ago' manually via the 'Rewrite results' function.
i am using dojo toolkit with php codeigniter 2.1.0 and i want to put space in tab name wherever necessary.
Anyone has any solution??
My code is :
<div id="setupParty" data-dojo-type="dijit.MenuItem"
onclick="addPartyTab('AddParty');">Manage <u>P</u>arty</div
If i will directly write as :
<div id="setupParty" data-dojo-type="dijit.MenuItem"
onclick="addPartyTab('Add Party');">Manage <u>P</u>arty</div
then it throws error
I want my tab to be displayed with name as "Add Party"
can anyone suggest me solution for this???
Thanx in advance
What error does it throw?
how does the code in addPartyTab look like?
The following should work in any case:
onclick="addPartyTab('Add Party');">
However, this may not be an ideal solution. You need to look into your addPartyTab function to first, ensure the text with embedded space is coming through fine (and i dont see any reason why it shouldnt) and then examine the code in that function to ensure it is being processed correctly - i suspect somewhere in there you will find why it is breaking.
In general, you can set title on a dijit tab (which is typically a contentpane) directly even if the title contains spaces without any issue. Following is a typical way of doing it:
dijit.byId("myTabContentPane").set("title", "Add Party - Hurray!");
where myTabContentPane is the id of the contentpane that makes up that tab
I need an input mask for numerics, like "9999.99" - or "9999.9" . I know there are plugins for jquery in general - question is: Has anybody used one with jquerymobile? Thanks gang!
this plugin seems nice on desktop, but for some reasons it has some problems on mobile devices (tested on android 2.3.3).
2 problems I had :
with $('#someInput').mask("99/99/9999",{placeholder:"."});
when I type 12345678, I obtain 12/45/7863 (some problems when placing the '/'s)
when I try to give a value (calculated before but editable) it put the '../../....' in place when I focus the input.
Do someone have a workaround or a more mobile device friendly mask plugin?
Edit: After a lot of tries and failures, it seems the problem is not in the masked input plugin (which is not realy a news as it works perfectly on desktops and Ios) but it's the way android manage the modification of the value of a focus input.
When you add a character, it display it well but remember where the cursor was and do not move it so when you type afterward it seem's it go back before the adding.
I tried to do the trick by adding a setrange but it seems to don't account the added characters. Out of ideas I did it by filtering input on keypress, spacing the characters in the input and putting an image of / / in the background.
I'm still open to anything which could be cleaner.
There's awsome plugin to use in jquery in http://digitalbush.com/projects/masked-input-plugin/
It work awsome when used in pc. But when i try on opera mobile emulator. It messed up.
This jsFiddle link working with phone
The HTML is:
<form id="contact_info_form">
Cell Phone: <br/>
<input type="text" value="" class="input-phone" name="Q3" id="Q3" />
</form>
And the Javascript:
$(function(){
$(".input-phone").mask("(999)-999-9999");
});
Recently I have developed simple and easy input mask on input field to US phone format jquery-input-mask-phone-number
Just Add jquery-input-mask-phone-number plugin and call usPhoneFormat Function.
$(document).ready(function () {
$('#yourphone').usPhoneFormat({
format: 'xxx-xxx-xxxx',
});
});
Demo Example https://jsfiddle.net/1kbat1nb/
NPM URL https://www.npmjs.com/package/jquery-input-mask-phone-number
GitHub URL https://github.com/rajaramtt/jquery-input-mask-phone-number
There's several section of our site where the user needs to enter some information, and Firefox's auto fill takes over when the page loads - mostly incorrectly!
For example, there's a "Fax Number" field that for some users Firefox keeps filling in with their email address. If they don't see this and they go to submit the form out validators complain to them that it isn't a valid number format.
This really has our sales guys worried because when they go to look at a customers page, they sometimes see it filled in with their own personal info.
Is there any way to prevent Firefox from doing this?
Add autocomplete="off" to your form tag, as documented in the Mozilla document How to Turn Off Form Autocompletion
<form name="form1" id="form1" method="post" autocomplete="off"
action="http://www.example.com/form.cgi">
[...]
</form>
Do read the section on exceptions and workarounds though - the browser will ignore the autocomplete attribute if you have a Name or Address field in the form!
If you don't care about validation, you can use autocomplete="off"
BTW here's a great article from Mozilla themselves about autocompletion
Firefox usually autocompletes based on the field names, so it sounds to me like you might have some underlying confusion with what your fields are called.
I ran into the same problem on Firefox with forms having a 'username' and 'password' field. In this case autocomplete="off" doesn't seem to work, as stated here: https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion (bottom of page).
The only way I found right know to have en empty fields when opening the page is to empty them in javascript. jQuery code example:
setTimeout(function(){
$('input[name="username"],input[name="password"]').val("");
}, 0);
I know it's ugly (especially the setTimeout but I couldn't figure another way. Even putting this in $(window).load() doesn't seem to work.
Try to use dynamic input names.
If autocomplete="off" in the form fails, try using autocomplete="off" in the input field directly and hit Ctrl + F5.
Actually, since a few weeks I've noticed Firefox started mixing autofill values, dropdownlists show entries even from different sites. They probably broke something in their recent builds. Now some personal entries can be seen by people just asking to check mails on your pc. Desire to block this feature is now very understandable.