fullcalendar startParam format v3.0.1 - json

with fullcalendar v3.0.1 I try to set initial date range with this setting:
startParam: '2017-01-01 00:00:00',
but, if I go back into the past with arrows button, I can back to 2016 and previous years...

What makes you think that startParam restricts when the calendar can go back to? It's a parameter passed to the server when new events are fetched which tells the server the start date from which events should be returned in the current request - generally it will correspond to the start date of the current view in the calendar. And if you look at the docs for this property: https://fullcalendar.io/docs/event_data/startParam/, it mentions nothing about what you describe. I don't understand why you thought this would work.
If, for some reason, you want to stop users going back in time before a certain date, there is no currently official supported way to do this. This issue log: https://github.com/fullcalendar/fullcalendar/issues/429 suggests that support may arrive in a future version, but at present you will need to work around it.
To be honest though I'm not sure why you really would need to do this. If you want to prevent users seeing any events before a particular date, the simplest way would be not to provide any event data to the calendar which is before that date - then if the user moves to those earlier dates, the calendar would simply be blank.
If you really feel you need to do this though, the only way I can think of would be to handle the viewRender event, and if the first day displayed in the view is on or before your minimum date, disable the "previous" button, or something.

Related

Generate the list of Calendar dates

I am having a list of dates , but the requirement is to enable only the dates I have. I am using Silk UI calendar control and it has the option of giving the disabled dates. I am not sure how to generate the list of disabled dates . I have the dates since last year., Can anyone please help me with this. I am new to outsystems and in a real quick need. Thanks
I am not sure I understand what you are asking. Maybe you could provide a bit more context or even attach a sample that isolates what you are trying to do.
In any case I looked at the Silk UI Calendar control's documentation and here's what I found about the parameter you're referring to:
String containing disabled days. If the string is empty, all days are active. Example: "2015-06-15, 2015-06-18, 2015-06-19, 2015-06-20"
You can find more and documentation at Silk UI's web site: https://labs.outsystems.net/silkui/
Hope it helps!
Cheers!

paypal link for subscription with start date

I found link for making buy now payments using PayPal. For example, the following link is used for payment for Buy Now buttons:
https://www.paypal.com/cgi-bin/webscr?business=example#yourwebsite.com&cmd=_xclick&currency_code=USD&amount=99&item_name=productname
where it uses some variables like business(for receiver's email), amount, item_name,etc..,
I am looking for a link just like the above for subscriptions with start date, i.e, a valid variable for specifying the subscription to start. I Googled it and I found the variable subscr_date can be used for specifying the start date. but I don't know how to make a proper working link for subscription with start date.
I think you're confusing the two. PayPal does provide a query string button for Buy Now but I don't recall ever seeing one for subscriptions. Instead, those buttons typically contain a form with all of your options.
PayPal does have a simpler solution now. Their Javascript Buttons library appears to greatly simplify this process. I think this might do what you want it to.
<script src="paypal-button.min.js?merchant=YOUR_MERCHANT_ID"
data-button="subscribe"
data-name="My product"
data-amount="1.00"
data-recurrence="1"
data-period="M"
async
></script>
If that still won't work, you will need to use the Payments Standard HTML, which also supports recurring payments

Stream Position Returned By Box API Cannot Be Used To Track Events

Thanks for your reply for my question: Is this a bug of Box API v2 when getting events
This is a new problem related to this. The problem is that I cannot reliably use the next_stream_position I got from previous calls to track events.
Given this scenario:
Given the following two GET HTTP queries:
1. GET https://api.box.com/2.0/events?stream_position=1336039062458
This one returns the JSON file which contains one file entry of myfile.pdf and the next stream position = 1336039062934
2. GET https://api.box.com/2.0/events?stream_position=1336039062934
This call uses the stream position I got from the first call. However, it returns the JSON contains the exactly same file entry of myfile.pdf with the first call.
I think if the first call gives a stream position, it should be used as a mark for that exact time (say: TIme A). If I use that stream position in subsequent queries, no events before "Time A" should be returned.
Is this a bug? Or did I use the API in the wrong way?
Many thanks.
Box’s /events endpoint is focused on delivering to you a highly reliable list of all the events relevant to your Box account. Events are registered against a time-sequenced list we call the stream_position. When you hit the /events API and pass in a stream_position we respond to you with the events that happened slightly before that stream position, up to the current stream_position, or the chunk_size, whichever is lesser. Due to timing lag and our preference to make sure you don’t miss some event, you may receive duplicate events when you call the /events API. You may also receive events that look like they are ‘before’ events that you’ve already received. Our philosophy is that it is better for you to know what has happened, than to be in the dark and miss something important.
Box events currently give you a window roughly 5 seconds into the past, so that you don't miss some event.
We have considered just delaying the events we send you by about 5 seconds and de-duplicating the events on our side, but at this point we've turned the dial more towards real-time. Let us know if you'd prefer a fully de-duped stream, that was slower.
For now, (in beta) if you write your client to check for duplicate events, and discard them, that will be best. We are about to add an event_id to the payload so you can de-duplicate on that. Until then, you'll have to look at a bunch of fields, depending on the event type... It's probably more challenging that it is worth.
In order to help you be able to figure out if an event is a duplicate, we have now added to each event an event_id that will be unique. It is our intention that the event_id will allow you to de-duplicate the responses you receive from subsequent GET /events calls.
You can see this reflected in the updated documentation here, including example payloads.

Databinding issue about updating data issue between MySQL database and my devexpress Gauge value?

Background:
Developing a trading system which subscribe to many events which are sent by API of Interactive Brokers. One interesting event is about my trading account value which fluctuates during trading hour so I would prefer to see the information with accountvalueupdate event immediately. I develop this one based on ActiveX api and c# in Visual Studio 2010.
the presentation I wanna check this information is to use a gauge developed by(http://www.devexpress.com/Products/NET/Controls/WinForms/Gauges/). This gauge looks fancy but the principle should be similar to the normal gauge we use in Visual Studio. It seems like I could only update the value of the gauge by databinding since I tried to assign updated account value to this.myGauge.value and failed.
I build up MySql connection between MySql and VS2010. I create only one table in MySQL which is called account. For the sake of simplicity, i only have two column(accountID and accountValue) and one row|(which means when event comes with new accountValue, I just overwrite the value of accountValue last session then the number of row is always one. really simple idea.....).In that Gauge proporties I found databinng option and I setted up by using advanced option to navigate throw available table and bind it to the only useful column accountValue.
Issue:
I set up the default value of the accountValue as 500 as default for test. I build my software. The gauge shows 500 correctly.
Of course, my real account value is not 500, so Now I click one button to connect to API and start listening the event. After few seconds, event arrives since I opened on Console for managing the mysql table and use select * from account to continuously watch the update. I noticed the value of accountValue column(TABLE WORKS RIGHT AND WE ONLY HAVE ONE ROW, OEVERWRITTING MODE) becomes the right one, for example, 35000.
HOWEVER, THE GAUGE DOES NOT CHANGE AT ALL...!! Now If i closed my software and build again, the gauge shows the right value 35000. Now I shut down the api and no coming event and only use commandline of mysql to change the value of accountValue again to 500. NO UPDATING in gauge as well.
It looks like the gauge only read the value of table during the build session or when it starts and never listen to the update of binding databases.
By the way, I tried to set up the biding data mode to either "onValidation" or "onPropertieschanged" but it does not solve although the "onPropertieschanged" looks the right one....
I tried to assign updated account value to this.myGauge.value...
Unfortunately, the information you provided doesn't allow to clearly diagnose this problem. There is no the Value property neither in WinForms GaugeControl nor in CircularGauge (as soon as in Linear/Digital/StateIndicator gauge), but only in ASPxGaugeControl (ASPxGaugeControl.Value). So, please provide a full sample code that doesnot work on your side.
All these properties can be changed manually in code or data-bound to data sources using the standard .NET data-binding mechanism:
The ArcScaleComponent.DataBindings property allows you to data-bind
to the current value of a circular gauge's scale (ArcScale.Value).
The LinearScaleComponent.DataBindings property allows you to
data-bind to the current value of a linear gauge's scale
(LinearScale.Value).
The DigitalGauge.DataBindings property allows you to data-bind to the
text displayed by a digital gauge.
The StateIndicatorComponent.DataBindings property allows you to
data-bind to a state of a state indicator gauge.
Please, review the following articles for more details: Data Binding.
The databinding feature is demonstrated in the Gauge's Main Demo project (the DataBinding module):
this.arcScaleComponent2.DataBindings.Add(
new System.Windows.Forms.Binding("Value", this.productsBindingSource,
"UnitsOnOrder", true, System.Windows.Forms.DataSourceUpdateMode.Never));
P.S. Please use the DevExpress Support Center to ask a questions or report issues, because there is no guarantee of DX involvement when you use the communities, newsgroups or other communication channels.

How to implement a time wait before html form resubmission?

I have an html form which inserts data into a database. I just built it.. it's very basic, as I'm just doing this to learn. In doing this, I see that I can hit the back browser button and post again.. and again.. and again.. and it keeps writing to the db.
I've seen sites where I try to resubmit info and it tells me I must wait 60 seconds (or whatever). Is this the preferred method to solve this problem? If so, how does one go about implementing it?
Or maybe you would handle it a different way?
When you insert a row, store the submission time in the table, or in the user's session.
Whenever you process the form, compare that time to the current time. If it's within 60 seconds, display an error instead of inserting a row.
There are two methods :
i) Simple client side javascript:
Store the time of last event in a javascript variable,
when the user does the event again , send an alert message about timing.
( This method can be fooled though by users knowing javascript )
ii) Store the time of last event in your database at backend when the form post is done. When the same form post is done again, check for the time, if it is allowed, do the processing, else reply with a message about the timing.